|
| 1 | +# Laravel 5.2 Scaffold Generator |
| 2 | + |
| 3 | + |
| 4 | +Hi, this is a scaffold generator for Laravel 5.2. (Laravel scaffold for Laravel 5.1? change branch to laravel-5.1 ) |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +## Usage |
| 9 | + |
| 10 | +### Step 1: Install Through Composer |
| 11 | + |
| 12 | +``` |
| 13 | +composer require 'laralib/l5scaffold' --dev |
| 14 | +``` |
| 15 | + |
| 16 | +### Step 2: Add the Service Provider |
| 17 | + |
| 18 | +Open `config/app.php` and, to your **providers** array at the bottom, add: |
| 19 | + |
| 20 | +``` |
| 21 | +"Ravaelles\Laravel5Scaffold\GeneratorsServiceProvider" |
| 22 | +``` |
| 23 | + |
| 24 | +### Step 3: Run Artisan! |
| 25 | + |
| 26 | +You're all set. Run `php artisan` from the console, and you'll see the new commands `make:scaffold`. |
| 27 | + |
| 28 | +## Examples |
| 29 | + |
| 30 | + |
| 31 | +``` |
| 32 | +php artisan make:scaffold Tweet --schema="title:string:default('Tweet #1'), body:text" |
| 33 | +``` |
| 34 | +This command will generate: |
| 35 | + |
| 36 | +``` |
| 37 | +app/Tweet.php |
| 38 | +app/Http/Controllers/TweetController.php |
| 39 | +database/migrations/2015_04_23_234422_create_tweets_table.php |
| 40 | +database/seeds/TweetTableSeeder.php |
| 41 | +resources/views/layout.blade.php |
| 42 | +resources/views/tweets/index.blade.php |
| 43 | +resources/views/tweets/show.blade.php |
| 44 | +resources/views/tweets/edit.blade.php |
| 45 | +resources/views/tweets/create.blade.php |
| 46 | +``` |
| 47 | +And don't forget to run: |
| 48 | + |
| 49 | +``` |
| 50 | +php artisan migrate |
| 51 | +``` |
| 52 | + |
| 53 | +### Other Examples (new) |
| 54 | + |
| 55 | +Same as above with use of the prefix. It will create the prefix in redirects of controller and the links of views (v1.0.7): |
| 56 | +``` |
| 57 | +php artisan make:scaffold Tweet --schema="title:string:default('Tweet #1'), body:text" --prefix="admin" |
| 58 | +``` |
| 59 | +Create the empty scaffold views, controller, seed, migration and model (v1.0.6): |
| 60 | +``` |
| 61 | +php artisan make:scaffold Tweet |
| 62 | +``` |
| 63 | +Create the empty scaffold (with prefix) views, controller, seed, migration and model (v1.0.7): |
| 64 | +``` |
| 65 | +php artisan make:scaffold Tweet --prefix="admin" |
| 66 | +``` |
| 67 | + |
| 68 | +## Scaffold |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +###Data type Date (on view) |
| 74 | + |
| 75 | + |
| 76 | +###Data type Boolean (on view) |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +# Todo task list |
| 83 | +1 - Validations |
| 84 | + |
| 85 | +2 - Support a Localization |
| 86 | + |
| 87 | +3 - More fields type |
| 88 | + |
| 89 | +4 - Default tests file |
| 90 | + |
| 91 | +5 - sass and js with gulp |
| 92 | + |
| 93 | +**Send us your ideas.** (send message to @fernandobritofl (Twitter)) |
| 94 | + |
| 95 | + |
| 96 | +<br/><br/> |
| 97 | +##Collaborators |
| 98 | + [Fernando Brito](https://github.com/fernandobritofl "fernandobritofl") |
| 99 | + <br/>[Sylvio Tavares](https://github.com/sylviot "Sylviot") |
| 100 | + <br/>[Raphael Heitor](https://github.com/raphaelheitor "raphaelheitor") |
| 101 | + <br/>[Alfred Nutile](https://github.com/alnutile "alnutile") |
| 102 | + <br/>[Sazzad Hossain Khan](https://github.com/itsazzad "itsazzad") |
| 103 | + <br/>[Alexander Makhaev](https://github.com/mankms "mankms") |
| 104 | + <br/>[Adam Brown](https://github.com/DeftNerd "DeftNerd") |
| 105 | + <br/>[TJ Webb](https://github.com/webbtj "webbtj") |
| 106 | + <br/>[Tsaganos Tolis](https://github.com/Dev-Force "Dev-Force") |
0 commit comments