laravel artisan命令汇总

本文为joshua317原创文章,转载请注明:转载自joshua317博客 https://www.joshua317.com/article/3

首先我们通过php artisan list命令可以看到我们所有可以执行的artisan命令,如下图所示:

接下来我们找一些常用的命令进行整理一下

一、auth

#1.清除过期的密码重置密钥;Flush expired password reset tokens
php artisan auth:clear-resets

二、backup

#1.删除配置中超过指定天数的所有备份;Remove all backups older than specified number of days in config
php artisan backup:clean
#2. 显示所有备份的列表;Display a list of all backups
php artisan backup:list
#3. 监控所有备份的运行状况;Monitor the health of all backups
php artisan backup:monitor
#4. 运行备份;Run the backup
php artisan backup:run

三、cache

#1.清除应用程序缓存;Flush the application cache
php artisan cache:clear
#2.从缓存中删除项目,通常指文件、redis等缓存;Remove an item from the cache
php artisan cache:forget
#3. 创建一个缓存数据库表的迁移;Create a migration for the cache database table
php artisan cache:table

四、config

#1. 刷新应用程序缓存;Flush the application cache
php artisan config:cache
#2.从缓存中删除一个项;Remove an item from the cache
php artisan config:clear

五、db

#1. 在数据库中添加记录;Seed the database with records
php artisan db:seed
#2. 删除所有表、视图和类型;Drop all tables, views, and types
php artisan db:wipe

六、dusk

#1.安装ChromeDriver二进制文件;Install the ChromeDriver binary
php artisan dusk:chrome-driver
#2.创建一个新的Dusk组件类;Create a new Dusk component class
php artisan dusk:component
#3.从上次运行开始运行失败的Dusk测试,并在失败时停止;Run the failing Dusk tests from the last run and stop on failure
php artisan dusk:fails
#4.将Dusk安装到应用程序中;Install Dusk into the application
php artisan dusk:install
#5
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值