Home > Backend Development > PHP Tutorial > How to set the automatic login time in laravel? For example, I want to set up automatic login for 30 days.

How to set the automatic login time in laravel? For example, I want to set up automatic login for 30 days.

WBOY
Release: 2023-03-01 20:04:01
Original
1512 people have browsed it

How to set the automatic login time in laravel? For example, I want to set up automatic login for 30 days now,

Reply content:

How to set the automatic login time in laravel? For example, I want to set up automatic login for 30 days now,

Set session.php under config

<code>'lifetime' => 43200,
'expire_on_close' => false,</code>
Copy after login

If the driver layer uses memcached, please pay attention to http://php.net/manual/zh/memcached.expiration.php if the setting exceeds 30 days.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template