PHP artisan 命令合集
创建控制器
php artisan make:controller 控制器名称php artisan make:controller SitesController
创建模型 model
php artisan make:model 模型名称php artisan make:model User
创建数据表
php artisan make:migration create_表名_table --create=表名
php artisan make:migration create_tasks_table --create=tasks // 创建 migration 文件
php artisan migrate //执行创建指令
添加数据表字段名
php artisan make:migration add_字段名_column_to_表名 --table=表名
php artisan make:migration add_intro_column_to_tasks --table=tasks
php artisan migrate
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: