DEV Community

Ariel Mejia
Ariel Mejia

Posted on

Install Laravel Valet in MontereyOS

Install Valet Globally

In the terminal type this command:

composer global require laravel/valet
Enter fullscreen mode Exit fullscreen mode

Execute Valet install command

In the terminal type this command:

valet install
Enter fullscreen mode Exit fullscreen mode

You can change the PHP version for different projects

You can use a different PHP version for multiple projects and change between PHP versions with this command syntax:

valet use php@7.2 // for Laravel 5.6 to 8

valet use php@8.0 // for Laravel 9
Enter fullscreen mode Exit fullscreen mode

If you are going to handle a lot of different projects with different versions you can use the new feature of Valet 3 of Multiversion support.

Isolate a PHP version with Valet

Located in the project root directory, you can run this command:

valet isolate php@7.4 // for Laravel 5.6 to 8
valet isolate php@8.0 // for Laravel 9
Enter fullscreen mode Exit fullscreen mode

Top comments (0)