本文为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