install php 8 for laravel code example Example: install laravel 5.8 composer create-project --prefer-dist laravel/laravel blog "5.8.*"