session.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. | requests. By default, we will use the lightweight native driver but
  10. | you may specify any of the other wonderful drivers provided here.
  11. |
  12. | Supported: "native", "cookie", "database", "apc",
  13. | "memcached", "redis", "array"
  14. |
  15. */
  16. 'driver' => 'native',
  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 before it expires. 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 native 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. 'files' => storage_path().'/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. /*
  73. |--------------------------------------------------------------------------
  74. | Session Cookie Name
  75. |--------------------------------------------------------------------------
  76. |
  77. | Here you may change the name of the cookie used to identify a session
  78. | instance by ID. The name specified here will get used every time a
  79. | new session cookie is created by the framework for every driver.
  80. |
  81. */
  82. 'cookie' => 'laravel_session',
  83. /*
  84. |--------------------------------------------------------------------------
  85. | Session Cookie Path
  86. |--------------------------------------------------------------------------
  87. |
  88. | The session cookie path determines the path for which the cookie will
  89. | be regarded as available. Typically, this will be the root path of
  90. | your application but you are free to change this when necessary.
  91. |
  92. */
  93. 'path' => '/',
  94. /*
  95. |--------------------------------------------------------------------------
  96. | Session Cookie Domain
  97. |--------------------------------------------------------------------------
  98. |
  99. | Here you may change the domain of the cookie used to identify a session
  100. | in your application. This will determine which domains the cookie is
  101. | available to in your application. A sensible default has been set.
  102. |
  103. */
  104. 'domain' => null,
  105. );