$ php artisan list
$ php artisan list make // 查看所有有效的make命令
$ php artisan migrate // 表迁移
$ php artisan make:seeder UsersTableSeeder // 生成数据填充文件
$ php artisan db:seed // 数据填充
$ php artisan route:cache // 生成路由缓存
$ php artisan route:list // 查看已添加的路由
$ php artisan route:clear // 移除路由缓存文件
$ php artisan make:middleware CheckToken // 创建中间件
$ php artisan make:controller UserController // 创建控制器
$ php artisan make:request StoreBlogPost // 创建表单请求
$ php artisan make:rule Uppercase // 创建自定义验证规则,将会在 app/Rules 目录下生成一个新的验证规则
$ php artisan make:migration create_users_table // 生成迁移文件
$ php artisan make:migration add_is_admin_to_users_table --table=users // 给某个表添加字段
$ php artisan migrate:rollback // 回滚迁移
$ php artisan migrate:rollback --step=5 // 回滚指定数目的迁移
$ php artisan migrate:reset // 回滚所有的应用迁移
$ php artisan migrate:refresh // 在单个命令中回滚 & 迁移
$ php artisan migrate:refresh --seed // 重建数据库并填充数据...
$ php artisan migrate:refresh --step=5 // 回滚或重建指定数量的迁移
$ php artisan migrate:fresh // 删除所有表 & 迁移
$ php artisan migrate:fresh --seed
$ php artisan make:resource UserResource // 生成资源类
$ php artisan preset none // 移除前端脚手架代码
$ php artisan make:auth // 生成用户登录注册所需要的所有东西
$ php artisan make:policy PostPolicy // 创建策略文件
$ php artisan key:generate // 生成应用key
$ php artisan tinker // artisan 程序测试
$ php artisan make:command SendEmails // 创建自定义的 artisan 命令
$ php artisan event:generate // 创建事件监听器
$ php artisan queue:work // 监听队列
$ php artisan queue:listen // 启动队列系统,队列在启动完成后会进入监听状态
$ php artisan queue:table // 生成database队列数据表
$ php artisan make:job ProcessPodcast // 创建队列任务
$ php artisan queue:failed // 查看 failed_jobs 数据表中的所有失败任务
$ php artisan horizon // Horizon 是一个监控程序,需要常驻运行,通过此命令启动。安装了 Horizon 以后,我们将使用 horizon 命令来启动队列系统和任务监控,无需使用 queue:listen
$ php artisan storage:link // 创建storage/app/public/ 的软连接
$ php artisan make:mail OrderShipped // 生成可邮寄类
$ php artisan down // 开启维护模式
$ php artisan up // 关闭维护模式
$ php artisan jwt:secret // 生成jwt秘钥
$ php artisan make:provider EasySmsServiceProvider // 创建一个服务提供者
$ php artisan make:test TopicApiTest // 创建测试文件
$ php artisan make:notification TopicReplied // 创建通知类
$ php artisan notifications:table // 创建数据通知频道数据表
$ php artisan vendor:publish --provider="Mews\Purifier\PurifierServiceProvider" // 对第三方类库生成配置文件
$ php artisan make:scaffold Projects --schema="name:string:index,description:text:nullable,subscriber_count:integer:unsigned:default(0)" // 使用脚手架生成代码框架,依附Laravel 5.x Scaffold Generator
Laravel 5.5 Artisan
猜你喜欢
转载自blog.csdn.net/qq_37910492/article/details/84541414
今日推荐
周排行