2017 © Pedro Peláez
 

library laravel5generators

Laravel 5 Generators

image

janareit/laravel5generators

Laravel 5 Generators

  • Thursday, April 21, 2016
  • by janareit
  • Repository
  • 1 Watchers
  • 1 Stars
  • 235 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 24 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

Laravel 5 Generators

(suitable for 5.2), (*1)

Latest Version Software License Total Downloads, (*2)

This is a custom fork from http://sky.pingpong-labs.com/docs/2.0/generators Official documentation available from there., (*3)

Its forked for better match my own needs for quick scaffolding in different Laravel 5 projects., (*4)

Additions/Changes from original:

  1. RouteModel binding functionality added and scaffolded to existiong file
  2. Controller actions upgraded to inject Model classes to take use of RouteModelBindings
  3. 'extends' functionality for views now possible to input from scaffold command
  4. 'prefix' can be multi-level deep. For example --prefix=Main/Admin
  5. Models stored to App\Repositories folder
  6. 'responsive' generates responsive index view instead of table style

Example usage

Preparations:

  1. To correctly edit with scaffolding RouteServiceProvider.php file you need to add a comment line inside your boot method:
//scaffolded routes will appear here [do not remove]
  1. Add provider to app.php config
'janareit\laravel5generators\GeneratorsServiceProvider::class'

Run from console for example:

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, (*5)

This should output (no questions asked, as last flag declares):, (*6)

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:, (*7)

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:, (*8)

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., (*9)

Credits

Thank you guys at Pingpong labs (https://github.com/pingpong-labs/generators)!, (*10)

The Versions

21/04 2016

dev-master

9999999-dev

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

21/04 2016

2.4.0

2.4.0.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

20/04 2016

2.3.0

2.3.0.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

04/03 2016

2.2.1

2.2.1.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

03/03 2016

2.2.0

2.2.0.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

10/06 2015

2.1.2

2.1.2.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

10/06 2015

2.1.1

2.1.1.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

10/06 2015

2.1.0

2.1.0.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

05/06 2015

2.0.11

2.0.11.0

Laravel 5 Generators

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Janar Eit, (fork from Pingpong Labs)

laravel generators janareit

05/06 2015

2.0.10

2.0.10.0

Laravel Generators

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

laravel generators pingpong

19/05 2015

2.0.6

2.0.6.0

Laravel Generators

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

laravel generators pingpong

18/05 2015

2.0.5

2.0.5.0

Laravel Generators

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

laravel generators pingpong

23/04 2015

2.0.0

2.0.0.0

Laravel Generators

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

laravel generators pingpong

13/11 2014

1.0.1

1.0.1.0

Laravel Generators

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

laravel generators pingpong

29/10 2014

1.0.0

1.0.0.0

Simple generators package for Laravel framework

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

laravel generators pingpong