Create Controller & Model in one Artisan Command
In this article, we will explain to you how to create controller and model in one artisan command. The artisan command is one type of command-line interface in laravel. The laravel framework provides a number of helpful commands and it’s used to we can quickly create the model and controller.
laravel create model using artisan
1 | php artisan make:model Student |
laravel create controller using artisan
1 | php artisan make:controller StudentController |
laravel create controller with all methods
1 | php artisan make:controller StudentController --resource |
laravel create controller and model
1 | php artisan make:controller StudentController --model=Student |
Please follow and like us: