thomasgroch / ResourceGenerator

Generate all Structure for a given resource name

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resource-generator

Latest Version on Packagist Software License

Generate all Structure for a given resource name

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.

Structure

Create and remove components of a resource. These include:

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

Install

Via Composer

$ composer require groch/resource-generator

Register the service provider in config/app.php.

groch\ResourceGenerator\ResourceGeneratorServiceProvider::class,

Publish assets from the package.

php artisan vendor:publish --tag=install-resource

Add your UsersTableSeeder and move the default "User.php" model to Model namespace/folder.

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.

Generate a new resource

php artisan gen:resource car

Remove a generated resource

php artisan gen:resource car --delete=1

Change log

Please see CHANGELOG for more information on what has changed recently.

Credits

  • Thomas Letsch Groch

License

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

About

Generate all Structure for a given resource name

License:MIT License


Languages

Language:PHP 100.0%