AuthenticationException.php 688B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Illuminate\Auth;
  3. use Exception;
  4. class AuthenticationException extends Exception
  5. {
  6. /**
  7. * All of the guards that were checked.
  8. *
  9. * @var array
  10. */
  11. protected $guards;
  12. /**
  13. * Create a new authentication exception.
  14. *
  15. * @param string $message
  16. * @param array $guards
  17. * @return void
  18. */
  19. public function __construct($message = 'Unauthenticated.', array $guards = [])
  20. {
  21. parent::__construct($message);
  22. $this->guards = $guards;
  23. }
  24. /**
  25. * Get the guards that were checked.
  26. *
  27. * @return array
  28. */
  29. public function guards()
  30. {
  31. return $this->guards;
  32. }
  33. }