hcomg / laravel-easy-generator
php artisan command to generate fully working crud with api resource by having database tables
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/hcomg/laravel-easy-generator
Requires
- php: >=5.5.9
- dingo/api: 1.0.x@dev
- laravel/framework: >=5.0.0
Suggests
- dingo/api: A RESTful API package for the Laravel frameworks.
This package is not auto-updated.
Last update: 2025-10-26 09:09:16 UTC
README
php artisan command to generate fully working crud with api resource by having database tables
Features
1. Add api to routes.
2. Create resource controller with Dingo API.
3. Create model with Validator rules from Database.
4. ...
Requirements
Laravel >=5.1
PHP >= 5.5.9
dingo/api: 1.0.x@dev
Installation
Open your terminal(CLI), go to the root directory of your Laravel project, then follow the following procedure.
- 
Install Through Composer composer require hcomg/laravel-easy-generator --dev 
- 
Add the Service Provider Open /app/Providers/AppServiceProvider.phpand, to yourregisterfunction, add:public function register() { if ($this->app->environment() !== 'production') { $this->app->register(\EasyGenerator\EasyGeneratorServiceProvider::class); } } 
- 
Run php artisan help hcomg:gento see all parameters
##Examples
php artisan hcomg:gen --model=User --table=users --controller=User Creating catalogue for table: users Model Name: User Created Controller: ./app/Models/User.php Created Controller: ./app/Http/Controllers/UserController.php Created Controller: ./app/Transformers/UserTransformer.php Adding Route: $api->resource('users', '\App\Http\Controllers\UserController');
Then run php artisan api:routes to see the api list.