user() !== null; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { /** @var Project $project */ $project = $this->route('project'); return [ 'board_column_id' => [ 'nullable', 'integer', Rule::exists('board_columns', 'id')->where( fn ($query) => $query->where('project_id', $project->id), ), ], 'name' => ['required', 'string', 'max:255'], ]; } }