Jaytee
4 years ago
5599
13
Laravel

Changing Model Directory

Posted 4 years ago by Jaytee

Hey guys,

I'm wanting to create a 'Models' folder of course to store all my Models. I'm aware that I can already do this and change the namespace but i'm also wanting any future models that i create via artisan, to direct them to this folder instead of the App root.

So basically

php artisan make:model Example

will be created and stored into 'App\Models and then Example' instead of 'App\Example'

How would I achieve this? I'm sure i've seen a config file before for this but i'm not sure if that was a package.

Thanks

Please sign in or create an account to participate in this conversation.