How to run the command:
php artisan ...
In a different directory so that the generated files are in the folder I set
How to run the command:
php artisan ...
In a different directory so that the generated files are in the folder I set
This will depend on the command you want to execute, but we assume that you want to execute migration
, you can set path
(Path) like this:
php artisan migrate --path=/app/database/migrations/relations
1 - Remember that you must in this directory where the file is artisan
2 - And the php executable should be in the environment variables
But if you want to execute the command in another folder, just put the complete path of each file, for example:
c:\bin\php.exe c:\meu_projeto\artisan migrate --path=c:\meu_projeto\migrations
In the example, my php executable is in the "bin" folder in the root of c:
, while my project is in the "my_project" folder and within "my_project" the migrations
.
This generates a lot of work, so it is preferable to enter the folder where it is the
artisan
file and put the php executable in the variables environment.