Create New Laravel Project1:17
or any of its sibling items. Now, in the Rails world, this can be incredibly useful, because the process of rendering and compiling your views is actually pretty darn expensive. That's not necessarily the case with PHP and Laravel, but still, we might find a good place for this in our workflow. All right, so, in the next, it's probably going to be two, maybe three videos, we're going to experiment with this together. And we might decide at the very end, ah, maybe it's more trouble than it's worth, or we may find that this is incredibly useful. I'm not sure how it's going to turn out, so why don't you come with me, work along with me, and, yeah, we'll see how it turns out. So, to finish up this video, let's install a new project and also set up a per-project Homestead installation. Laravel new Russian doll caching lesson. And let's cd in there. Next, we'll install Homestead specifically for this project.
Install Homestead Dependencies1:59
and also set up a per-project Homestead installation. laravel new Russian doll caching lesson. And let's cd in there. Next, we'll install Homestead specifically for this project. And we're pulling this in because I know I'm going to be using memcached, and I don't want to set that up on my Mac. Honestly, I don't even know how to. So, we'll just use Homestead to build up an Ubuntu box for us. composer require laravel/homestead. And save that to our dev dependencies list. All right, we got that. Next, we can do homestead make, or possibly vendor/bin/homestead make if you need to. And what that's going to do is it'll set up our Vagrantfile and our Homestead.yaml file in our project. And if we take a look at that, you can see that, yeah, we already have a site set up for homestead.app, and it will point to the public directory for this project. Next, if I were to cat /etc/hosts, I already have that
Configure Hosts and Vagrant2:46
you can see that, yeah, we already have a site set up for Homestead.app, and it will point to the public directory for this project. Next, if I were to cat /etc/hosts, I already have that registered here. So, if you don't, you'll want to open that file with vim, and, yeah, add that at the very bottom. Anyways, we should be all set to go. And, of course, I'm assuming you have Vagrant and VirtualBox already set up. If not, watch one of the Homestead lessons at LaraCast, and we'll get you up to speed. Otherwise, yeah, we can do a vagrant up to build up our machine. And that should do it. So, if you now open your browser and visit Homestead.app, we can see our project. And, of course, we can ssh into Vagrant, list the files, and, yeah, we can cd in there. We can see what version of php we have. In this case, PHP 7, which is awesome. And, yeah, we're all set to go. So, in the next video,
we can cd in there. We can see what version of php we have. In this case, PHP 7, which is awesome. And, yeah, we're all set to go. So, in the next video, yeah, we'll figure out how we want this all to work. I'll see you then.
