Yes, just like attempt
you can use remember with login
, login
takes two parameters, a user object and an optional remember
, you can see that here, it defaults to false
.
Auth::login($user, true);
For this sort of question you can make good use of either the Laravel API explorer, from the search bar enter what you're interested in (in this case auth::login
) and then take a look at the parameters:
public void login(UserInterface $user, bool $remember = false)
Log a user into the application.
Parameters
UserInterface $user
bool $remember
Return Value void
Alternatively search through the Framework repository :-)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community