Skip to main content

Posts

Showing posts with the label composer

How to install a specific version of Laravel

Sometimes, when starting a new Laravel project, you can't use the latest version. For example, what should you do when the PHP version on your server is lower than what Laravel requires? In such situations, you have several options: 1. Using Composer create-project (recommended): composer create-project laravel/laravel project-name "8.*" or you can change the order or add additional options composer create-project --prefer-dist laravel/laravel:^8.0 project-name It will install Laravel version 8.x into a project-name directory. If you want to install a specific minor version of Laravel 8, you can specify it more precisely. For example, to install version 8.0.1, you would use: composer create-project --prefer-dist laravel/laravel:^8.0.1 project-name 2. Using Laravel installer. If you already have PHP and Composer installed, you may install the Laravel installer via Composer. First, install the Laravel installer: composer global require laravel/installer Then create a new p...