composer install laravel version code example
Example 1: laravel install
composer create-project laravel/laravel <example-app>
Example 2: laravel install by composer
composer create-project --prefer-dist laravel/laravel blog
cd example-app
php artisan serve
Example 3: composer install laravel 7
composer global require laravel/installer
Example 4: how to install laravel
composer global require "laravel/installer=~1.1"