The laravel-code-generators package allows you to create Models, Controllers, API Routes, Tests and Policies from existing database table structure.
It will fasten initial application setup, so you can advance straight to application logic.
Require the evolvo/laravel-code-generators package in your composer.json and update your dependencies:
$ composer require evolvo/laravel-code-generatorsadd
Evolvo\LaravelCodeGenerators\LaravelCodeGeneratorsServiceProvider::classto config/app.php 'providers' array
- Create your migrations and run them using
php artisan migrate. - Run
php artisan scaffold table_nameto generate code for all existing table_name table - Option
--no-twill not generate tests. - Option
--no-tswill not generate tests responses - Run
php artisan generate:test table_nameto generate CRUD tests. - Run
php artisan generate:single-test path/test_nameto generate single test method - Run
php artisan generate:test-response path/test_nameto generate CRUD test responses