0

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?

Mustafa Poya
  • 2,051
  • 1
  • 13
  • 25

1 Answers1

2

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
AnasSafi
  • 3,608
  • 28
  • 25
Mustafa Poya
  • 2,051
  • 1
  • 13
  • 25