user() && $this->user()->email === config('app.admin_email'); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'name' => 'sometimes|required|string|max:255|unique:categories,name,'.$this->category->id, ]; } }