Playing
01. How to Update the Laravel Installer

Episodes

0%
Your progress
  • Total: 3m
  • Played: 0m
  • Remaining: 3m
Join or sign in to track your progress

Transcript

00:00
Let's take a look at a few different ways we can update the official Laravel installer. To start with we're going to figure out which version we are currently running and this is pretty useful for debugging. We're just going to run the global Laravel command and we're going to
00:13
use the version flag. You can see here I'm using actually the latest version at the time of recording. Okay so before we go anywhere, before we look at two or three options to upgrade the Laravel installer, a really important part is if you're using Laravel Herd, this comes with the Laravel installer. So chances are if you're working with Laravel Herd, you have it installed,
00:38
just go ahead and update Laravel Herd, your Laravel installer will be updated and then that's pretty much all you need to do. Otherwise if you have this installed with Composer globally, let's take a look at three different ways that we can update. Now the first way is probably the easiest and you shouldn't run into any troubles with these. We're going to go ahead and do a Composer update
01:02
but we're going to use global. So remember when you installed the Laravel installer, you would have used global require to pull this in. You might have chosen a specific version or you might have just said Laravel installer. So rather than say global require, we're going to say global update and that's going to go ahead and update the Laravel installer for you and that should be enough
01:25
and then when you run Laravel version again, you should see a version bumped up. Now if for any reason you come across a problem with doing an update, you can go ahead and just reinstall it. So the first thing that we would do is again make sure we use the global command that's really important. We're going to do a remove on Laravel installer, that's going to go ahead and remove that
01:47
then we can just go ahead and re-require this in and that's going to go ahead and add that to our global composer json file. So at this point you should be able to upgrade your Laravel installer in this way, however if you need to manually dive into your global composer file, you can do that as well. So the first thing that you're going to do is either using your text editor, we're going to
02:12
go ahead and cd into the .composer directory on our local machine and we're going to use our editor to open up composer.json. So when we do a global install on the Laravel installer or any other packages, this will be within composer.json. Now if I go ahead and open this up in my editor, you can see here that we've got the Laravel installer pulled in as well as another package
02:36
here and you can just go ahead and manually bump this version, so you can just change around the version that you want to use here and then once you've done that you can go ahead and back over to your terminal, do a composer global update. So when we do composer global update without specifying a package, that's just going to take all of the dependencies that we have in that global
03:00
composer.json file we just opened and that is going to go ahead and update it. So there we go, two or three ways that we can update our global Laravel installer and just remember if you're using Laravel herd, this will come with the Laravel installer, so chances are you just need to update Laravel herd.
1 episode 3 mins

Overview

The Laravel installer is the easiest way to create a fresh Laravel application, but it'll need updating occasionally. Here's how!

Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Episode discussion

No comments, yet. Be the first!