Friday, June 28, 2024
No menu items!
Google search engine
HomeLaravelHow to create a model using Artisan command

How to create a model using Artisan command

In this blog, We will know the entire steps to create a new model using aritsan command

Open CMD Window in the Laravel

php artisan make:model <Model Name> 


If you want to create a new model in laravel with the name Country Model use the command like below:

php artisan make:model CountryName

Once the above command to create the Model is executed then the Model file will be available in the path -> app\Models.

Remember to create model name to be in pascal case. Each Word of first letter must be capital letter and the all the model name should end with suffix the word “Model”

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments