Author Archives: Admin

What is Session Driver in laravel ?

Session driver define an option where to store session data of each http request.
we can set this config/Session.php -bydefault it will be file

file – sessions are stored in storage/framework/sessions.
cookie – sessions are stored in secure, encrypted cookies.
database – sessions are stored in a relational database.
memcached / redis – sessions are stored in one of these fast, cache based stores.
array – sessions are stored in a PHP array and will not be persisted.

Click here for more interview questions

remember_token in laravel

its field in the user table(or tables used for login purpose) it stores a string in this column
For implementing remember me feature,you need to pass boolean value as the second parameter
if (Auth::attempt([’email’ => $email, ‘password’ => $password], $remember)) {

}
This feature will keep the user aunthenticated undefinitely or untill they manually log out.

Click here for more interview questions