From the course: Building Laravel and Vue.js 2 Web Apps

Installing Homestead

From the course: Building Laravel and Vue.js 2 Web Apps

Start my 1-month free trial

Installing Homestead

- [Instructor] In this video, we'll begin to set up a complete development environment fr Laravel in Vue.js. On the Laravel.com home page, if you click Documentation up here, one of the first things that you'll see mentioned is Laravel Homestead. Homestead is a virtual machine, actually an Ubuntu Linux machine, that comes prepackaged with everything you need to build websites with Laravel in Vue.js and run them locally. Homestead is a Vagrant box, which means we'll be using a piece of software called Vagrant to create and manage this virtual machine. On the Get Started page, they mention that Vagrant alone can't handle everything. We also need a virtualization provider to actually run the virtual machine that we're going to manage with Vagrant. One good option in this list that's available on multiple platforms is VirtualBox. If you're trying to follow along and you haven't worked with Vagrant before, you may want to pause the video here while you install Vagrant and VirtualBox because I won't be going through that entire process, and it's straightforward for most users. If you do hit any snags, I would suggest first carefully reading this Getting Started page and following the links, especially the one here for install the latest version of Vagrant. But one common gotcha that you'll see mentioned in the Laravel docs is in this red section down here. If you're a Windows user, you'll need to make sure that hardware virtualization is enabled in your BIOS settings. Now we're going to head over to the command line. I'll be using PowerShell in this course. And if you're also using Windows, I would strongly suggest that whatever terminal you're using, that you launch it by right-clicking and choosing Run as administrator. Also, before I forget, I have a shortcut for Visual Studio Code down here, which we'll be using in this course, and I want to right-click that and choose Properties, Advanced, and make sure that Run as administrator is also checked here because if you don't do this, you will probably run into issues later on with permissions when we have to create symbolic links in our project, which are going to help us manage user uploaded files, such as images for the menu that we're going to build. So in PowerShell, the first thing that I'm going to do is change to my user directory with cd tilde. And then we can find the command for adding the Homestead box to Vagrant in the Laravel docs. If I scroll down a little bit more, it's Vagrant box add laravel/homestead. So I'm going to copy that and paste it into PowerShell. And it's going to ask us what provider we're going to use and we'll enter 3 for VirtualBox. This could take a couple minutes, so if you're following along, you may want to let that finish before you go on to the next video. If you've used Vagrant before, and you're hitting any snags at this point, then making sure you're using an up-to-date version of both Vagrant and VirtualBox can usually help sort out most issues. Now that we've added the Homestead box to Vagrant, we'll take a look at configuring and booting it in the next video.

Contents