php artisan serve limitations 0:00In the last episode, we finished up by running the php artisan serve command to set up a local PHP environment, and this is a great option. The only downside, though, is you have to remember to run it. So, for example, if I close that out and run it again, it's not going to work, so you'd always have to remember to run php artisan serve. Still not a big deal, but something to be aware of. Now, if you'd like some extra credit, you might consider pulling in Laravel Valet. So, as it turns out, in Laravel, you have two recommended choices, Homestead and Valet. Now, I'd say Homestead is a great choice, but a little more intensive and for a slightly more experienced developer. Choosing Valet vs Homestead 0:36Now, I'd say Homestead is a great choice, but a little more intensive and for a slightly more experienced developer. This will use a tool called Vagrant to set up a virtual machine that is separate from your Mac install. If you need that, it's available to you. But otherwise, I really like Valet, so let's use that. Now, one caveat, unfortunately, this is Mac-specific, so if you're a Windows user, go ahead and click to the next episode. This will not affect much, I promise. Okay, so let's go to the Installation tab. Installing Valet prerequisites 1:01This will not affect much, I promise. Okay, so let's go to the Installation tab. It wants us to pull in Homebrew. Luckily, we've already done that. It wants PHP 7.3. You should already have that. It needs Composer. We got it. Next, we need to pull in Valet Globally, which we learned how to do in the last episode. So I will hit Ctrl C and then run that command.Next, we need to pull in Valet Globally, which we learned how to do in the last episode. So I will hit Ctrl C and then run that command. Okay, so once again, it's going to make this Valet utility available globally. Excellent. Next, let's see. Run the Valet install command. This will configure and install Valet and register the daemon to launch when your computer starts or your system starts. All right. I usually store all of my projects within a code directory. Running install and park 1:40All right. I usually store all of my projects within a code directory. If you don't have one, you can make that directory and then cd to it. All right, let's run Valet install. Excellent. That pulled in everything we need. The only remaining step is to park Valet. It uses a command called park, and if we take a look at this, it registers the current working directory with Valet, which basically means every project within this directory is available to Valet. Testing .test domains 2:04directory with Valet, which basically means every project within this directory is available to Valet. So we're already in that code directory. Let's run it. So now, here's the cool part. In the last episode, we installed a fresh project, right? That means I can access this by running freshproject.test within the browser. Let's give it a shot. freshproject.test. Whoa, how cool is that?freshproject.test. Whoa, how cool is that? For any project you create, you'll visit the folder name .test. And no longer do you have to run phpArtisanServe, because it's already available to you. Let's do it one more time. If I go back to my code directory, let's build up a brand new project. I will call it Laravel6. It pulls in the dependencies through Composer. It sets up the framework. And now, I should be able to visit Laravel6.test. Opening project for routing 2:48It sets up the framework. And now, I should be able to visit Laravel6.test. Come on. How cool is that? So the only remaining step is to open this project within your code editor of choice. You can use Sublime, PhpStorm, anything you want. If I open PhpStorm, there we go. Here's your framework. So now, open your routes web file, and this will get you ready for the next episode, where we discuss routing.So now, open your routes web file, and this will get you ready for the next episode, where we discuss routing.