The Laravel installer is the easiest way to create a fresh Laravel application, but it'll need updating occasionally. Here's how!
As a reminder, you probably ran a command similar to the following to get the Laravel Installer globally available on your machine:
composer global require laravel/installer
If you're using Laravel Herd, this ships with the Laravel Installer. To update your Laravel Installer version, you may get away with just updating Herd.
You can check your version using the following command:
laravel --version
Laravel Installer 5.12.0
Here are a few ways to bring the Laravel Installer up to date.
To update the Laravel Installer, use the Composer update
command, but globally:
composer global update laravel/installer
To update (or downgrade) to a specific version, you can also specify the version as you would normally with Composer:
composer global update "laravel/installer:^5.12"
This should bring your Laravel Installer version to the latest version!
Sometimes, you'll see issues with a Composer update
, and your best bet is to uninstall and reinstall the Laravel Installer.
composer global remove laravel/installer
composer global require laravel/installer
The first command uninstalls it, and the second command will install the latest version. Done!
This is the least likely option, but here's how to do it.
First, open up ~/.composer/composer.json
(or wherever it's found on your machine). Here's what it may look like:
{
"require": {
"laravel/installer": "^5.12"
}
}
To update the Laravel Installer, bump the version in this file, save it, and run the following command:
composer global update
This will read your global Composer file and update the Laravel Installer (and any other global dependencies you have installed).
We've discussed a few ways to update your Laravel Installer globally on your machine. The first option is usually the easiest, but you have some extra options now, too.