Home  >  Article  >  Backend Development  >  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
WBOYOriginal
2016-12-01 00:26:031467browse

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>

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

Statement:
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