6 |--------------------------------------------------------------------------
7 | Default Session Driver
8 |--------------------------------------------------------------------------
10 | This option controls the default session "driver" that will be used on
11 | requests. By default, we will use the lightweight native driver but
12 | you may specify any of the other wonderful drivers provided here.
14 | Supported: "file", "cookie", "database", "apc",
15 | "memcached", "redis", "array"
19 'driver' => env('SESSION_DRIVER', 'file'),
22 |--------------------------------------------------------------------------
24 |--------------------------------------------------------------------------
26 | Here you may specify the number of minutes that you wish the session
27 | to be allowed to remain idle before it expires. If you want them
28 | to immediately expire on the browser closing, set that option.
32 'lifetime' => env('SESSION_LIFETIME', 120),
34 'expire_on_close' => false,
37 |--------------------------------------------------------------------------
39 |--------------------------------------------------------------------------
41 | This option allows you to easily specify that all of your session data
42 | should be encrypted before it is stored. All encryption will be run
43 | automatically by Laravel and you can use the Session like normal.
50 |--------------------------------------------------------------------------
51 | Session File Location
52 |--------------------------------------------------------------------------
54 | When using the native session driver, we need a location where session
55 | files may be stored. A default has been set for you but a different
56 | location may be specified. This is only needed for file sessions.
60 'files' => storage_path('framework/sessions'),
63 |--------------------------------------------------------------------------
64 | Session Database Connection
65 |--------------------------------------------------------------------------
67 | When using the "database" or "redis" session drivers, you may specify a
68 | connection that should be used to manage these sessions. This should
69 | correspond to a connection in your database configuration options.
76 |--------------------------------------------------------------------------
77 | Session Database Table
78 |--------------------------------------------------------------------------
80 | When using the "database" session driver, you may specify the table we
81 | should use to manage the sessions. Of course, a sensible default is
82 | provided for you; however, you are free to change this as needed.
86 'table' => 'sessions',
89 |--------------------------------------------------------------------------
90 | Session Sweeping Lottery
91 |--------------------------------------------------------------------------
93 | Some session drivers must manually sweep their storage location to get
94 | rid of old sessions from storage. Here are the chances that it will
95 | happen on a given request. By default, the odds are 2 out of 100.
99 'lottery' => [2, 100],
102 |--------------------------------------------------------------------------
103 | Session Cookie Name
104 |--------------------------------------------------------------------------
106 | Here you may change the name of the cookie used to identify a session
107 | instance by ID. The name specified here will get used every time a
108 | new session cookie is created by the framework for every driver.
112 'cookie' => 'laravel_session',
115 |--------------------------------------------------------------------------
116 | Session Cookie Path
117 |--------------------------------------------------------------------------
119 | The session cookie path determines the path for which the cookie will
120 | be regarded as available. Typically, this will be the root path of
121 | your application but you are free to change this when necessary.
128 |--------------------------------------------------------------------------
129 | Session Cookie Domain
130 |--------------------------------------------------------------------------
132 | Here you may change the domain of the cookie used to identify a session
133 | in your application. This will determine which domains the cookie is
134 | available to in your application. A sensible default has been set.
138 'domain' => env('SESSION_DOMAIN', null),
141 |--------------------------------------------------------------------------
143 |--------------------------------------------------------------------------
145 | By setting this option to true, session cookies will only be sent back
146 | to the server if the browser has a HTTPS connection. This will keep
147 | the cookie from being sent to you if it can not be done securely.
151 'secure' => env('SESSION_SECURE_COOKIE', false),
154 |--------------------------------------------------------------------------
156 |--------------------------------------------------------------------------
158 | Setting this value to true will prevent JavaScript from accessing the
159 | value of the cookie and the cookie will only be accessible through
160 | the HTTP protocol. You are free to modify this option if needed.
167 |--------------------------------------------------------------------------
169 |--------------------------------------------------------------------------
171 | This option determines how your cookies behave when cross-site requests
172 | take place, and can be used to mitigate CSRF attacks. By default, we
173 | do not enable this as other CSRF protection services are in place.
175 | Supported: "lax", "strict"