当前位置:网站首页>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
边栏推荐
- Statistical learning method -- perceptron
- 【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
- Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
- 121. 买卖股票的最佳时机
- MySQL数据库基本操作-DQL-基本查询
- Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
- 山东老博会,2022中国智慧养老展会,智能化养老、适老科技展
- Mysql database backup script
- Use moviepy Editor clips videos and intercepts video clips in batches
- JS modularization
猜你喜欢
![[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

Statistical learning method -- perceptron

Continuous creation depends on it!

统计学习方法——感知机
Notification uses full resolution

Unity3d click events added to 3D objects in the scene

强化实时数据管理,英方软件助力医保平台安全建设

Logback日志框架第三方jar包 免费获取

How does geojson data merge the boundaries of regions?

Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
随机推荐
laravel post提交数据时显示异常
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
Enterprise log analysis system elk
How to query the data of a certain day, a certain month, and a certain year in MySQL
What about the pointer in neural network C language
What are compiled languages and interpreted languages?
Limit of total fields [1000] in index has been exceeded
一个普通人除了去工厂上班赚钱,还能干什么工作?
山东老博会,2022中国智慧养老展会,智能化养老、适老科技展
C4D learning notes 2- animation - timeline and time function
prometheus api删除某个指定job的所有数据
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
Step by step monitoring platform ZABBIX
Leetcode-136-只出现一次的数(用异或来解答)
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
分步式监控平台zabbix
SPI master rx time out中断
Rongyun won the 2022 China Xinchuang digital office portal excellence product award!
Common training data set formats for target tracking
iptables只允许指定ip地址访问指定端口