session.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Session Driver
  6. |--------------------------------------------------------------------------
  7. |
  8. | This option controls the default session "driver" that will be used on
  9. | requets. By default, we will use the light-weight cookie driver but
  10. | you may specify any of the other wonderful drivers provided here.
  11. |
  12. | Supported: "cookie", file", "database", "apc",
  13. | "memcached", "redis", "array"
  14. |
  15. */
  16. 'driver' => 'cookie',
  17. /*
  18. |--------------------------------------------------------------------------
  19. | Session Lifetime
  20. |--------------------------------------------------------------------------
  21. |
  22. | Here you may specify the number of minutes that you wish the session
  23. | to be allowed to remain idle for it is expired. If you want them
  24. | to immediately expire when the browser closes, set it to zero.
  25. |
  26. */
  27. 'lifetime' => 120,
  28. /*
  29. |--------------------------------------------------------------------------
  30. | Session File Location
  31. |--------------------------------------------------------------------------
  32. |
  33. | When using the "file" session driver, we need a location where session
  34. | files may be stored. A default has been set for you but a different
  35. | location may be specified. This is only needed for file sessions.
  36. |
  37. */
  38. 'path' => __DIR__.'/../storage/sessions',
  39. /*
  40. |--------------------------------------------------------------------------
  41. | Session Database Connection
  42. |--------------------------------------------------------------------------
  43. |
  44. | When using the "database" session driver, you may specify the database
  45. | connection that should be used to manage your sessions. This should
  46. | correspond to a connection in your "database" configuration file.
  47. |
  48. */
  49. 'connection' => null,
  50. /*
  51. |--------------------------------------------------------------------------
  52. | Session Database Table
  53. |--------------------------------------------------------------------------
  54. |
  55. | When using the "database" session driver, you may specify the table we
  56. | should use to manage the sessions. Of course, a sensible default is
  57. | provided for you; however, you are free to change this as needed.
  58. |
  59. */
  60. 'table' => 'sessions',
  61. /*
  62. |--------------------------------------------------------------------------
  63. | Session Sweeping Lottery
  64. |--------------------------------------------------------------------------
  65. |
  66. | Some session drivers must manually sweep their storage location to get
  67. | rid of old sessions from storage. Here are the chances that it will
  68. | happen on a given request. By default, the odds are 2 out of 100.
  69. |
  70. */
  71. 'lottery' => array(2, 100),
  72. );