雪漫城的风宅

laravel 项目在服务器上的更新

· NightingaleWK · 更新于 2023-11-07
laravel
文章目录

代码更新时会经常遇到服务器数据变动导致无法 git pull ,需要强行覆盖并重新进行参数配置,具体如下

强制覆盖

1
2
3
git fetch --all
git reset --hard origin/master
git pull

修改 config 配置文件

/data/wwwroot/yanji.wkarrow.top/config/admin.php

1
2
3
4
5
6
7
.
.
.
'https' => env('ADMIN_HTTPS', ture),
.
.
.

之后重启 nginx 服务并清理缓存

1
2
3
service nginx restart
//清理各类缓存
php artisan cache:clear && php artisan config:clear && php artisan route:clear && php artisan view:clear

数据库迁移并填充

若有需要可以执行

1
2
php artisan migrate:regresh --seed
php artisan admin:install
上一篇:我开发用到的各种技术参数下一篇:laravel 项目 Homestead 开发环境的搭建