2017 © Pedro Peláez
 

library resource-generator

Generate all Structure for a given resource name.

image

groch/resource-generator

Generate all Structure for a given resource name.

  • Wednesday, October 11, 2017
  • by thomasgroch
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

resource-generator

Latest Version on Packagist ![Software License][ico-license] , (*1)

Generate all Structure for a given resource name, (*2)

Note: The code in this sample was originally written for a user experience prototype and does not necessarily demonstrate how to create production quality code., (*3)

Structure

Create and remove components of a resource. These include:, (*4)

Resourceful Controller
Migration
Seeder
Create Form Request
Update From Request
Test
Transformer

Install

Via Composer, (*5)

``` bash $ composer require groch/resource-generator, (*6)


Register the service provider in ``` config/app.php ```. ``` php groch\ResourceGenerator\ResourceGeneratorServiceProvider::class,

Publish assets from the package., (*7)

``` bash php artisan vendor:publish --tag=install-resource, (*8)


Add your `UsersTableSeeder` and move the default "User.php" model to `Model` namespace/folder. ``` bash php artisan migrate:fresh --seed php artisan config:clear php artisan config:cache composer dump-autoload php artisan key:generate php artisan jwt:secret

Usage

Run php artisan to see the new command gen:resource., (*9)

Generate a new resource ``` bash php artisan gen:resource car, (*10)


Remove a generated resource ``` bash php artisan gen:resource car --delete=1

Change log

Please see CHANGELOG for more information on what has changed recently., (*11)

Credits

License

The MIT License (MIT). Please see License File for more information., (*12)

The Versions

11/10 2017