authService->check(); } public function getSearchValue(): ?string { return $this->has('search') ? $this->string('search')->value() : null; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'search' => ['sometimes', 'string'], ]; } }