当前位置:网站首页>Laravel changed the session from file saving to database saving
Laravel changed the session from file saving to database saving
2022-07-07 16:21:00 【Full stack programmer webmaster】
1.laravel The default is to use file save session Of , Save in /storage/framework/sessions Next
2. Modify the configuration file config/session.php in ‘driver’ => env(‘SESSION_DRIVER’, ‘file’) take .env In the document SESSION_DRIVER The corresponding value is determined by file Change it to database, This means .env In file SESSION_DRIVER When the configuration item cannot be found , Just use file
3. stay .env The file is configured data library
4. Use the command to automatically generate and store session Data sheet for
php artisan session:table // Generate migration file After implementation /database/migrations/ Next add a new one with create_sessions_table.php The table at the end php artisan migrate // Add a new one in the database after execution sessions surface
5. The code uses session Way unchanged
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113198.html Link to the original text :https://javaforall.cn
边栏推荐
- Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
- 企业级日志分析系统ELK
- How does laravel run composer dump autoload without emptying the classmap mapping relationship?
- Limit of total fields [1000] in index has been exceeded
- 航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
- Numpy -- epidemic data analysis case
- 应用程序和matlab的通信方式
- 一个普通人除了去工厂上班赚钱,还能干什么工作?
- A JS script can be directly put into the browser to perform operations
- Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)
猜你喜欢

torch. Numel action

Three. JS introductory learning notes 19: how to import FBX static model

C4D learning notes 1- animation - animation key frames
![[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3](/img/8f/ca9ab042916f68de7994d9f2124da9.jpg)
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3

Wireless sensor networks -- ZigBee and 6LoWPAN

L'application à l'échelle de la normalisation mature des produits ai des compagnies maritimes, cimc, leader mondial de l'intelligence artificielle portuaire et maritime / intelligence artificielle des

Enterprise log analysis system elk
![Application example of infinite list [uigridview]](/img/11/3be1c63680e6de8f068e79690ecf12.jpg)
Application example of infinite list [uigridview]

星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”

分步式監控平臺zabbix
随机推荐
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
【知识小结】PHP使用svn笔记总结
通知Notification使用全解析
Mysql database basic operation DQL basic query
Laravel 中config的用法
融云斩获 2022 中国信创数字化办公门户卓越产品奖!
What are compiled languages and interpreted languages?
Use moviepy Editor clips videos and intercepts video clips in batches
Step by step monitoring platform ZABBIX
95. (cesium chapter) cesium dynamic monomer-3d building (building)
Power of leetcode-231-2
PHP实现微信小程序人脸识别刷脸登录功能
Communication mode between application program and MATLAB
L'application à l'échelle de la normalisation mature des produits ai des compagnies maritimes, cimc, leader mondial de l'intelligence artificielle portuaire et maritime / intelligence artificielle des
JS modularization
Leetcode-231-2的幂
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
分步式監控平臺zabbix
Shader basic UV operations, translation, rotation, scaling
模仿企业微信会议室选择