In this article, we will explain to you how to create controller and model in one artisan command. so we will give you a simple example of laravel create controller using artisan.

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

php artisan make:model Student

laravel create controller using artisan

php artisan make:controller StudentController

laravel create controller with all methods

php artisan make:controller StudentController --resource

laravel create controller and model

php artisan make:controller StudentController --model=Student