James Jeffery James Jeffery - 1 year ago 100
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?

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download