Auth.php 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. * @method static \Symfony\Component\HttpFoundation\Response|null onceBasic(string $field = 'email',array $extraConditions = [])
  20. * @method static null|bool logoutOtherDevices(string $password, string $attribute = 'password')
  21. * @method static \Illuminate\Contracts\Auth\UserProvider|null createUserProvider(string $provider = null)
  22. * @method static \Illuminate\Auth\AuthManager extend(string $driver, \Closure $callback)
  23. * @method static \Illuminate\Auth\AuthManager provider(string $name, \Closure $callback)
  24. *
  25. * @see \Illuminate\Auth\AuthManager
  26. * @see \Illuminate\Contracts\Auth\Factory
  27. * @see \Illuminate\Contracts\Auth\Guard
  28. * @see \Illuminate\Contracts\Auth\StatefulGuard
  29. */
  30. class Auth extends Facade
  31. {
  32. /**
  33. * Get the registered name of the component.
  34. *
  35. * @return string
  36. */
  37. protected static function getFacadeAccessor()
  38. {
  39. return 'auth';
  40. }
  41. /**
  42. * Register the typical authentication routes for an application.
  43. *
  44. * @return void
  45. */
  46. public static function routes()
  47. {
  48. static::$app->make('router')->auth();
  49. }
  50. }