代码生成器
优质
小牛编辑
130浏览
2023-12-01
遵照此规范,在实际操作中,有许多重复。接下来推荐一款专为本规范量身定做的代码生成器 Laravel 5.x Scaffold Generator。
本扩展支持 5.1 ~ 5.5 版本的 Laravel。
只需要一个命令:
即可生成:
$ 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< -----------