user()->can('users.change-password'); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'password' => [ 'required', 'string', 'min:8', 'confirmed' ], 'password_confirmation' => [ 'required' ], ]; } }