2017 © Pedro Peláez
 

library l5scaffold

Extend Laravel 5's generators scaffold.

image

janareit/l5scaffold

Extend Laravel 5's generators scaffold.

  • Saturday, June 6, 2015
  • by janareit
  • Repository
  • 1 Watchers
  • 3 Stars
  • 105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 124 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Laravel 5 Scaffold Generator

This is a scaffold generator for Laravel 5.0.x., (*1)

This generator has less advanced features than my other forked generators set at https://github.com/janareit/laravel5generators. Check out both of them to see whic one better suits your project needs., (*2)

Usage

Step 1: Install Through Composer

composer require 'janareit/l5scaffold' --dev

Step 2: Add the Service Provider

This package scaffolds views using laracasts/flash package, so you need add also this to providers., (*3)

Open config/app.php and, to your providers array at the bottom, add:, (*4)

'janareit\L5scaffold\GeneratorsServiceProvider',
'Laracasts\Flash\FlashServiceProvider'

Add a facade alias to the same file at the bottom:, (*5)

'Flash' => 'Laracasts\Flash\Flash'

Step 3: Run Artisan Command

php artisan vendor:publish

Step 4: Edit scaffolding config

Open config/scaffold.php and edit it according to your needs and wishes, (*6)

Step 5: Run Artisan!

You're all set. Run php artisan from the console, and you'll see the new commands make:scaffold., (*7)

Command example

(--prefix option is OPTIONAL. Running command without it will simply skip prefix in folders), (*8)

php artisan make:scaffold Post --schema="title:string:default('Main title'), body:text" --prefix=Blog

This command will generate:, (*9)

app/Repositories/Blog/Post.php
app/Http/Controllers/Blog/PostController.php
database/migrations/2015_06_03_234422_create_posts_table.php
database/seeds/Blog/PostTableSeeder.php
resources/views/blog/posts/index.blade.php
resources/views/blog/posts/show.blade.php
resources/views/blog/posts/edit.blade.php
resources/views/blog/posts/create.blade.php

And don't forget to run:, (*10)

php artisan migrate

Step 6: Add route

Open routes.php and add route that you generated., (*11)

For example:, (*12)

Route::resource('blog/posts', 'Blog\PostController');

Step 7: Add Route-Model binding

Add Route-Model binding and "use" clause to RouteServiceProvider.php, (*13)

For example:, (*14)

use App\Repositories\Blog\Post;

public function boot(Router $router)
    {
        parent::boot($router);

        $router->bind('posts', function($id) {
            return Post::findOrFail($id);
        });

    }

Scaffold

image image image, (*15)

Thanks for all previous contributors but since fixing bugs and adding features according to my own need was very slow I forked this repo. Mainly for my own project needs:), (*16)

Love and greetings to all Laravel 5 fellows ot there:), (*17)

The Versions

06/06 2015

dev-master

9999999-dev

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Janar Eit (forked from Fernando Brito)

laravel generators scaffold laravel5

03/06 2015

1.1.0

1.1.0.0

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Janar Eit (forked from Fernando Brito)

laravel generators scaffold laravel5

02/06 2015

1.0.4

1.0.4.0

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Janar Eit (forked from Fernando Brito)

laravel generators scaffold laravel5

02/06 2015

1.0.3

1.0.3.0

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Janar Eit (forked from Fernando Brito)

laravel generators scaffold laravel5

29/04 2015

1.0.2

1.0.2.0

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Fernando Brito

laravel generators scaffold laravel5

24/04 2015

1.0.1

1.0.1.0

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Fernando Brito

laravel generators scaffold laravel5

23/04 2015

1.0

1.0.0.0

Extend Laravel 5's generators scaffold.

  Sources   Download

MIT

The Requires

 

by Fernando Brito

laravel generators scaffold laravel5