Skip to content

Commit

Permalink
[9.x] Add hasUser method to Guard contract (#39167)
Browse files Browse the repository at this point in the history
* [9.x] Add `hasUser` method to Guard contract

- #24518 in this PR was added method `hasUser` to the GuardHelper trait. As for me it will be useful to have this method in the contract.

* Update Guard.php

Co-authored-by: Tetiana Blindaruk <t.blindaruk@gmail.com>
Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
3 people committed Oct 12, 2021
1 parent c7278f1 commit 438eba7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Illuminate/Contracts/Auth/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public function id();
*/
public function validate(array $credentials = []);

/**
* Determine if the guard has a user instance.
*
* @return bool
*/
public function hasUser();

/**
* Set the current user.
*
Expand Down

0 comments on commit 438eba7

Please sign in to comment.