This laravel code generator tool is create to enable people who work with laravel create CRUD and other operations easily just by defining names and types of fields.
Laravel code generator will enable you to easily:
- Generate Model PHP Automatically
- Generate Migration Script PHP Automatically
- Generate Create Request PHP Automatically
- Generate Update Request PHP Automatically
- Generate Delete Request PHP Automatically
- Generate Controller PHP Automatically
-
First step is you can find the file called LaravelGeneratorController.php here on the project and put it in the folder where you hold your controllers (for example App\Http\Controllers).
-
Then in your routes files (which for laravel 5.4 is routes\web.php) go and add a route to call index function of this controller. So simply add the below lines to your web.php file:
Route::resource('laravel_generator','LaravelGeneratorController');
-
Just open your browser or postman and call the link: http://your_projct_name/laravel_generator
-
By default this will use the local storage and create files in below folders
\Storage\App\Controller \Storage\App\Migration Scripts \Storage\App\Model \Storage\App\Request
This helped me a lot hope it will help you too.
Take care :)
Ozy