How To Change PHP Version Laravel Valet On Command | Macbook

Soefyan Syah
Soefyan Syah12 Aug 2023
LaravelPHPValet

Learn how to change PHP versions using the Laravel Valet command line to maintain separate versions of PHP in your local machine

How To Change PHP Version Laravel Valet On Command | Macbook
Learn how to change PHP versions using the Laravel Valet command line to maintain separate versions of PHP in your local machine

Cara Merubah Versi PHP di Macbook Ketika Menggunakan Laravel Valet

when i run a command

php artisan make:model CategoryLogistik -m 

end showing an error like this :

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.29. in /Users/soefyansyah/Documents/SoefyanFiles/www/rafanahotel/vendor/composer/platform_check.php on line 24

and a solution to solve this error you can running . pm(version php)
like this :

. pm81

and try run your command php artisan , and then this trouble can solve ;

Soefyan Syah

Written by Soefyan Syah

Hey there! I hope you find this post useful. If you have anything to say, questions or feedback, send me a tweet or an email.