user(); if (! $user) { return false; } $workspaceUser = $user->currentWorkspaceUser(); return ! $workspaceUser->role->is(WorkspaceUserRole::Worker); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'declaration_ids' => ['required', 'array', 'min:1', 'max:100'], 'declaration_ids.*' => ['integer'], ]; } }