auth.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Authentication Defaults
  6. |--------------------------------------------------------------------------
  7. |
  8. | This option controls the default authentication "guard" and password
  9. | reset options for your application. You may change these defaults
  10. | as required, but they're a perfect start for most applications.
  11. |
  12. */
  13. 'defaults' => [
  14. 'guard' => 'web',
  15. 'passwords' => 'users',
  16. ],
  17. /*
  18. |--------------------------------------------------------------------------
  19. | Authentication Guards
  20. |--------------------------------------------------------------------------
  21. |
  22. | Next, you may define every authentication guard for your application.
  23. | Of course, a great default configuration has been defined for you
  24. | here which uses "session" storage and the Eloquent user source.
  25. |
  26. | All authentication drivers have a user "source". This defines how the
  27. | users are actually retrieved out of your database or other storage
  28. | mechanisms used by this application to persist your user's data.
  29. |
  30. | Supported: "session"
  31. |
  32. */
  33. 'guards' => [
  34. 'web' => [
  35. 'driver' => 'session',
  36. 'source' => 'users',
  37. ],
  38. // 'api' => [
  39. // ],
  40. ],
  41. /*
  42. |--------------------------------------------------------------------------
  43. | User Sources
  44. |--------------------------------------------------------------------------
  45. |
  46. | All authentication drivers have a user "source". This defines how the
  47. | users are actually retrieved out of your database or other storage
  48. | mechanisms used by this application to persist your user's data.
  49. |
  50. | Supported: "database", "eloquent"
  51. |
  52. */
  53. 'sources' => [
  54. 'users' => [
  55. 'driver' => 'eloquent',
  56. 'model' => App\User::class,
  57. ],
  58. // 'database' => [
  59. // 'driver' => 'database',
  60. // 'table' => 'users',
  61. // ],
  62. ],
  63. /*
  64. |--------------------------------------------------------------------------
  65. | Resetting Passwords
  66. |--------------------------------------------------------------------------
  67. |
  68. | Here you may set the options for resetting passwords including the view
  69. | that is your password reset e-mail. You may also set the name of the
  70. | table that maintains all of the reset tokens for your application.
  71. |
  72. | Of course, you may define multiple password resetters each with a their
  73. | own storage settings and user providers. However, for most apps this
  74. | simple configuration with Eloquent is just perfect out of the box.
  75. |
  76. | The expire time is the number of minutes that the reset token should be
  77. | considered valid. This security feature keeps tokens short-lived so
  78. | they have less time to be guessed. You may change this as needed.
  79. |
  80. */
  81. 'passwords' => [
  82. 'users' => [
  83. 'source' => 'users',
  84. 'email' => 'emails.password',
  85. 'table' => 'password_resets',
  86. 'expire' => 60,
  87. ],
  88. ],
  89. ];