Package Data | |
---|---|
Maintainer Username: | summer_charlie |
Maintainer Contact: | fernandobritofl@gmail.com (Fernando Brito) |
Package Create Date: | 2017-01-30 |
Package Last Update: | 2022-03-06 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-24 15:03:29 |
Package Statistics | |
---|---|
Total Downloads: | 38,609 |
Monthly Downloads: | 47 |
Daily Downloads: | 0 |
Total Stars: | 335 |
Total Watchers: | 14 |
Total Forks: | 59 |
Total Open Issues: | 7 |
Laravel Scaffold Generator, for Laravel 5.3.
5.1 ~ 5.5:
composer require "summerblue/generator:~0.5" --dev
= 5.6 (Bootstrap4):
composer require "summerblue/generator:~1.0" --dev
Open /app/Providers/AppServiceProvider.php
and, to your register function, add:
public function register()
{
if (app()->environment() == 'local' || app()->environment() == 'testing') {
$this->app->register(\Summerblue\Generator\GeneratorsServiceProvider::class);
}
}
You're all set. Run php artisan
from the console, and you'll see the new commands make:scaffold
.
Use this command to generator scaffolding of Project in your project:
php artisan make:scaffold Projects --schema="name:string:index,description:text:nullable,subscriber_count:integer:unsigned:default(0)"
This command will generate:
$ php artisan make:scaffold Projects --schema="name:string:index,description:text:nullable,subscriber_count:integer:unsigned:default(0)"
----------- scaffolding: Project -----------
+ ./database/migrations/2017_04_17_065656_create_projects_table.php
+ ./database/factories/ModelFactory.php
+ ./database/seeds/ProjectsTableSeeder.php
+ ./database/seeds/DatabaseSeeder.php (Updated)
x ./app/Models/Model.php (Skipped)
+ ./app/Models/Project.php
+ ./app/Http/Controllers/ProjectsController.php
x ./app/Http/Requests/Request.php (Skipped)
+ ./app/Http/Requests/ProjectRequest.php
+ ./app/Observers/ProjectObserver.php
+ ./app/Providers/AppServiceProvider.php (Updated)
x ./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
x ./resources/views/error.blade.php
Migrated: 2017_04_17_065656_create_projects_table
----------- -------------------- -----------
----------- >DUMP AUTOLOAD< -----------
Generate the following: