James Jeffery James Jeffery - 5 months ago 40
PHP Question

How do I instruct artisan to save model to specific directory?

I'm using Laravel 5. I have created a

directory under the
directory, but when generating the models using Artisan it's storing them under the

I have searched the documentation to try and find how to specify a different path name, but to no avail:

php artisan make:model TestModel

How do I instruct
to save the model to specific directory?


If you want to specify the path when generating a model, you can use the Laravel Generators Package. You can then specify the location using the --path option like so:

php artisan generate:model TestModel --path=my/custom/location