18
votes

I want to create a model in a custom path. If i write the php artisan command like the following it will create model inside app.

php artisan make:model core

But i want to create the model file inside the custom made Models folder. How can i do it ?

2

2 Answers

43
votes

Just define the path where you want to create model.

php artisan make:model <directory_name>/<model_name>

e.g.

php artisan make:model Models/core
3
votes

You can do it easily with custom directory of your Models Folder (I assume Models Folder is sub folder of App). Just use this command php artisan make:model Models/core then you will get your desire result.
Thanks.