auth.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. use App\Models\User;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Authentication Defaults
  7. |--------------------------------------------------------------------------
  8. |
  9. | This option defines the default authentication "guard" and password
  10. | reset "broker" for your application. You may change these values
  11. | as required, but they're a perfect start for most applications.
  12. |
  13. */
  14. 'defaults' => [
  15. 'guard' => env('AUTH_GUARD', 'web'),
  16. 'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
  17. ],
  18. /*
  19. |--------------------------------------------------------------------------
  20. | Authentication Guards
  21. |--------------------------------------------------------------------------
  22. |
  23. | Next, you may define every authentication guard for your application.
  24. | Of course, a great default configuration has been defined for you
  25. | which utilizes session storage plus the Eloquent user provider.
  26. |
  27. | All authentication guards have a user provider, which defines how the
  28. | users are actually retrieved out of your database or other storage
  29. | system used by the application. Typically, Eloquent is utilized.
  30. |
  31. | Supported: "session"
  32. |
  33. */
  34. 'guards' => [
  35. 'web' => [
  36. 'driver' => 'session',
  37. 'provider' => 'users',
  38. ],
  39. ],
  40. /*
  41. |--------------------------------------------------------------------------
  42. | User Providers
  43. |--------------------------------------------------------------------------
  44. |
  45. | All authentication guards have a user provider, which defines how the
  46. | users are actually retrieved out of your database or other storage
  47. | system used by the application. Typically, Eloquent is utilized.
  48. |
  49. | If you have multiple user tables or models you may configure multiple
  50. | providers to represent the model / table. These providers may then
  51. | be assigned to any extra authentication guards you have defined.
  52. |
  53. | Supported: "database", "eloquent"
  54. |
  55. */
  56. 'providers' => [
  57. 'users' => [
  58. 'driver' => 'eloquent',
  59. 'model' => env('AUTH_MODEL', User::class),
  60. ],
  61. // 'users' => [
  62. // 'driver' => 'database',
  63. // 'table' => 'users',
  64. // ],
  65. ],
  66. /*
  67. |--------------------------------------------------------------------------
  68. | Resetting Passwords
  69. |--------------------------------------------------------------------------
  70. |
  71. | These configuration options specify the behavior of Laravel's password
  72. | reset functionality, including the table utilized for token storage
  73. | and the user provider that is invoked to actually retrieve users.
  74. |
  75. | The expiry time is the number of minutes that each reset token will be
  76. | considered valid. This security feature keeps tokens short-lived so
  77. | they have less time to be guessed. You may change this as needed.
  78. |
  79. | The throttle setting is the number of seconds a user must wait before
  80. | generating more password reset tokens. This prevents the user from
  81. | quickly generating a very large amount of password reset tokens.
  82. |
  83. */
  84. 'passwords' => [
  85. 'users' => [
  86. 'provider' => 'users',
  87. 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
  88. 'expire' => 60,
  89. 'throttle' => 60,
  90. ],
  91. ],
  92. /*
  93. |--------------------------------------------------------------------------
  94. | Password Confirmation Timeout
  95. |--------------------------------------------------------------------------
  96. |
  97. | Here you may define the number of seconds before a password confirmation
  98. | window expires and users are asked to re-enter their password via the
  99. | confirmation screen. By default, the timeout lasts for three hours.
  100. |
  101. */
  102. 'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
  103. ];