代码生成器

未匹配的标注

遵照此规范,在实际操作中,有许多重复。接下来推荐一款专为本规范量身定做的代码生成器 Laravel 5.x Scaffold Generator

本扩展支持 5.1 ~ 5.5 版本的 Laravel。

只需要一个命令:

Lv2plObN4q.gif

即可生成:

$ php artisan make:scaffold Projects --schema="name:string:index,description:text:nullable,subscriber_count:integer:unsigned:default(0)"

----------- scaffolding: Project -----------

+ ./database/migrations/2017_05_23_070517_create_projects_table.php
+ ./database/factories/ModelFactory.php
+ ./database/seeds/ProjectsTableSeeder.php
+ ./database/seeds/DatabaseSeeder.php (Updated)
+ ./app/Models/Model.php (Updated)
+ ./app/Models/Project.php
+ ./app/Http/Controllers/ProjectsController.php
+ ./app/Http/Requests/Request.php
+ ./app/Http/Requests/ProjectRequest.php
+ ./app/Observers/UserObserver.php (Skipped)
+ ./app/Observers/ProjectObserver.php
+ ./app/Providers/AppServiceProvider.php (Updated)
+ ./app/Policies/Policy.php
+ ./app/Policies/ProjectPolicy.php
+ ./app/Providers/AuthServiceProvider.php (Updated)
+ ./routes/web.php (Updated)

--- Views ---
   + create_and_edit.blade.php
   + index.blade.php
   + show.blade.php
+ ./resources/views/layouts/app.blade.php
+ ./resources/views/common/error.blade.php
Migration table created successfully.
Migrated: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_100000_create_password_resets_table
Migrated: 2017_05_23_070517_create_projects_table

----------- -------------------- -----------
-----------   >DUMP AUTOLOAD<    -----------

访问 homestead.app/projects :

file

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
Summer
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 0
发起讨论 只看当前版本


暂无话题~