user()?->can('user.update') ?? false; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'name' => ['required', 'string', 'max:255'], 'email' => ['required', 'email', 'max:255', Rule::unique('users', 'email')->ignore($this->route('user')->id)], ]; } }