wanghouting / laravel-admin-backup
a backup extension for laravel-admin
Installs: 24
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 1
Open Issues: 0
Type:tools
Requires
- php: ^7.0.3
- encore/laravel-admin: ^1.6.5
- nicolab/php-ftp-client: ^1.5
This package is auto-updated.
Last update: 2025-03-25 13:31:42 UTC
README
安装
-
composer:
composer require wanghouting/lt-dev-tools
-
初始化
- 如果之前没有安装laravel-admin,需要先执行
php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider" php artisan admin:install
php artisan ltbackup:install
-
添加定时任务
修改app/Console/kernel.php,在schedule里面增加
$schedule->command('ltbackup:backup --all')->everyMinute(); $schedule->command('ltbackup:clear')->dailyAt('1:00');
最后在cron中加入 ,注意修改“/path-to-your-project/artisan” 为你的项目下artisan路径
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1