increase session time

Laraship QuestionsCategory: Technicalincrease session time
st3fan asked 5 years ago
When people visit the website next day, they are logged out.

Where can we increase the session time of a login?
1 Answers
laraship Staff answered 5 years ago
Hello Stefan, You can change session lifetime in the .env files Change .env file in your app root
SESSION_LIFETIME=120
And value is in minutes.  
st3fan replied 5 years ago

great, thank you!

st3fan replied 5 years ago

FYI this is not 100% correct unless you change configuration.

Because config/session.php does not use env(“SESSION_LIFETIME”) by default, but it seems hardcoded in there.

so for those who wonder, make sure to change either config/session.php or add env(“SESSION_LIFETIME”) to this config file.

laraship Staff replied 5 years ago

yes, it should comply with your PHP session config too, thanks for pointing this out.