session variable in laravel

Report
Question
735 views

Sessions are used to store information about the user across the requests. Laravel provides various drivers like file, cookie, apc, array, Memcached, Redis, and database to handle session data. By default, file driver is used because it is lightweight. Session can be configured in the file stored at config/session.php.

Please explain why do you think this question should be reported?

Report Cancel

Accessing Session Data

$value = $request->session()->get('key');

Storing Session Data

$request->session()->put('key', 'value');

Deleting Session Data

$request->session()->forget('key');

Thread Reply

Leave an comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>