is('api/*')) { return true; } return auth()->check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { return [ 'name' => 'required|string|max:255', 'description' => 'nullable|string|max:255', ]; } }