Package Data | |
---|---|
Maintainer Username: | janareit |
Maintainer Contact: | janareit@gmail.com (Janar Eit, (fork from Pingpong Labs)) |
Package Create Date: | 2015-06-05 |
Package Last Update: | 2016-04-21 |
Home Page: | |
Language: | PHP |
License: | BSD-3-Clause |
Last Refreshed: | 2024-12-15 15:08:43 |
Package Statistics | |
---|---|
Total Downloads: | 258 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
(suitable for 5.2)
This is a custom fork from http://sky.pingpong-labs.com/docs/2.0/generators Official documentation available from there.
Its forked for better match my own needs for quick scaffolding in different Laravel 5 projects.
--prefix=Main/Admin
App\Repositories
folderRouteServiceProvider.php
file you need to add a comment line inside your boot
method://scaffolded routes will appear here [do not remove]
'janareit\laravel5generators\GeneratorsServiceProvider::class'
php artisan generate:scaffold moulding_machine --fields="name:string, number:tinyInteger:unsigned, active:boolean" --prefix=Masterdata/Manufacturing --responsive --force --extends="layouts.master" --no-question
PS: layouts.master will be stored to views root directory for security reasons so you don't overwrite your original master by accident.
If you don't have a layout master you should move it to resources/views/layouts
This should output (no questions asked, as last flag declares):
Model created successfully.
Migration created successfully.
Seed created successfully.
Form request created successfully.
Form request created successfully.
Controller created successfully.
Migrated: 2015_06_05_113543_create_moulding_machines_table
View created successfully.
View created successfully.
View created successfully.
View created successfully.
View created successfully.
View created successfully.
Route appended successfully.
RouteServiceProvider appended successfully.
Generated files are:
app/Http/Controllers/Masterdata/Manufacturing/MouldingMachinesController.php
app/Http/Requests/Masterdata/Manufacturing/Machines/CreateMouldingMachineRequest.php
app/Http/Requests/Masterdata/Manufacturing/Machines/UpdateMouldingMachineRequest.php
app/Repositories/Masterdata/Manufacturing/MouldingMachine.php
database/migrations/2015_06_05_113543_create_moulding_machines_table.php
database/seeds/MouldingMachinesTableSeeder.php
resources/views/masterdata/manufacturing/moulding_machines/create.blade.php
resources/views/masterdata/manufacturing/moulding_machines/edit.blade.php
resources/views/masterdata/manufacturing/moulding_machines/form.blade.php
resources/views/masterdata/manufacturing/moulding_machines/index.blade.php
resources/views/masterdata/manufacturing/moulding_machines/show.blade.php
resources/views/layouts.master.blade.php //this is in case you generate new layout. For security it's not overwriting directly to layouts path.
Additions to existing files are:
routes.php
Route::resource('masterdata/manufacturing/moulding_machines', 'Masterdata\Manufacturing\MouldingMachinesController');
RouteServiceProvider.php
$router->model('moulding_machines', 'App/Repositories/Masterdata/Manufacturing/MouldingMachine');
If all worked out correctly you should be able to see your newly created CRUD pages at yourdomain/masterdata/manufacturing/moulding_machines url.
Thank you guys at Pingpong labs (https://github.com/pingpong-labs/generators)!