I am looking for a solution that will allow me to run
artisan commands from my local machine and for them to take effect on my
For example, when running
php artisan migrate the command is run using the information stored in the
.env file points to the VM, but my terminal is trying to run them locally.
The majority of the commands run successfully because they do not need drivers from the remote machine. Running
php artisan route:list works fine.
How can I run
artisan commands using a local terminal?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
You need to change the following files:
variables: - key: APP_ENV value: local - key: DB_HOST_PORT value: ":3306"
'mysql' => [ // ... 'driver' => 'mysql', 'host' => env('DB_HOST') . env('DB_HOST_PORT'), // ... ]