Lavarel5 常用命令
Mysql
创建
- 创建数据表:
php artisan make:
- 加粗:
Ctrl/Cmd + B
执行
- 数据库的重置:
php artisan migrate:refresh
Main
- 创建控制器:
php artisan make:controller StaticPagesController
命令 说明
php artisan key:generate 生成 App Key
php artisan make:controller 生成控制器
php artisan make:model 生成模型
php artisan make:policy 生成授权策略
php artisan make:seeder 生成 Seeder 文件
php artisan migrate 执行迁移
php artisan migrate:rollback 回滚迁移
php artisan migrate:refresh 重置数据库
php artisan db:seed 填充数据库
php artisan tinker 进入 tinker 环境
php artisan route:list 查看路由列表
php artisan make:command 生成脚本
php artisan make:migration create_statuses_table --create="statuses" 创建表
本作品采用《CC 协议》,转载必须注明作者和本文链接