What's the highest possible value for the lara

2019-02-19 13:02发布

问题:

By default laravel sessions expire after two hours, I know this is for security but I have a web app which has a mobile app(android webview). Users keep complaining that they need to login each time they come to the app. As a temporal solution I will like to know how I can set this variable to "forever". thanks in advance

 'lifetime' => 120

what I want

'lifetime' => infinity

回答1:

Max integer value in PHP is 2147483647 for 32 bit platform and Laravel multiplies lifetime value by 60.

So maximum lifetime value is 35791394 for 32-bit platform. It's 68 years, so it's kind of infinity for the session. )