I have a Laravel 5.6 Project which is running with PHP Version 7.10 and another Laravel 7.x project with PHP version 7.4. I defined the PHP path in Windows 10 Environment Variable and every time I have to change the PHP Environment Variable to run each project.
any solution to prevent from this redundant work?
For Windows:
to run different projects with its required PHP version you can include the required PHP path before writing artisan serve:
C:\wamp64\bin\php\php7.0.33\php.exe artisan serve --host=127.0.0.1 --port=8000
C:\wamp64\bin\php\php7.4.9\php.exe artisan serve --host=127.0.0.1 --port=8500
For Linux (Ubuntu):
/usr/bin/php8.0 artisan serve --host=127.0.0.1 --port=8000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With