Auth.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static mixed guard(string|null $name = null)
  5. * @method static void shouldUse(string $name);
  6. * @method static bool check()
  7. * @method static bool guest()
  8. * @method static \Illuminate\Contracts\Auth\Authenticatable|null user()
  9. * @method static int|null id()
  10. * @method static bool validate(array $credentials = [])
  11. * @method static void setUser(\Illuminate\Contracts\Auth\Authenticatable $user)
  12. * @method static bool attempt(array $credentials = [], bool $remember = false)
  13. * @method static bool once(array $credentials = [])
  14. * @method static void login(\Illuminate\Contracts\Auth\Authenticatable $user, bool $remember = false)
  15. * @method static \Illuminate\Contracts\Auth\Authenticatable loginUsingId(mixed $id, bool $remember = false)
  16. * @method static bool onceUsingId(mixed $id)
  17. * @method static bool viaRemember()
  18. * @method static void logout()
  19. *
  20. * @see \Illuminate\Auth\AuthManager
  21. * @see \Illuminate\Contracts\Auth\Factory
  22. * @see \Illuminate\Contracts\Auth\Guard
  23. * @see \Illuminate\Contracts\Auth\StatefulGuard
  24. */
  25. class Auth extends Facade
  26. {
  27. /**
  28. * Get the registered name of the component.
  29. *
  30. * @return string
  31. */
  32. protected static function getFacadeAccessor()
  33. {
  34. return 'auth';
  35. }
  36. /**
  37. * Register the typical authentication routes for an application.
  38. *
  39. * @return void
  40. */
  41. public static function routes()
  42. {
  43. static::$app->make('router')->auth();
  44. }
  45. }