R
R
root092016-08-11 17:46:40
Laravel
root09, 2016-08-11 17:46:40

How to permanently login in laravel?

I authorize in laravel in this way: the documentation says that the second parameter is responsible for "remember me", the remember_token is written to the database, everything seems to work correctly, but the authorization is reset after a few hours, how to make the authorization "forever"?
Auth::login($user, true);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stanislav Pochepko, 2016-08-11
@DJZT

See config config/session.php
Parameterlifetime

E
eskrano, 2016-08-11
@eskrano

Auth::attempt($credentials,true);
It seems so, but we read the dock, in fact we set the second argument and voila. It's unlikely to always work, of course.

V
Vladislav Saveliev, 2016-08-11
@PhaseModerator

100% option to use cookies

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question