در حال بارگذاری ...

Choosing Editor and Terminal2:13

I will use in this series, or Visual Studio Code, or Sublime Text. All three are fantastic choices. Or again, if you really like what you're currently using, then stick with it. No problem there at all. Next up, you'll need access to a suitable terminal. And luckily, Mac and Windows ship with these out of the box. So for example, I'm on a Mac. If I were to search for terminal, and this is how mine looks. And yeah, we're not going to spend too much time in the terminal. But if you can change directories, if you can list files, if you can run a couple commands, you'll be in good shape. I'll show you one right now. If I want to change directories, I can use cd. And on my Mac, I'm going to go to my desktop. So I can do this right here. And there we go. If I want to list the files, I can use ls. And in this case, I don't have any files on my desktop. And later, you'll learn how to run commands like php and mysql. Okay.

Installing PHP and MySQL2:57

And there we go. If I want to list the files, I can use ls. And in this case, I don't have any files on my desktop. And later, you'll learn how to run commands like php and mysql. Okay. But otherwise, you can also install dedicated tools that some people prefer. For example, I use one called Warp. And here's what that looks like. A little bit cleaner. But still, effectively, the same thing. It just has a few bells and whistles. You might also consider a tool like iTerm. Or again, on Windows, Windows Terminal should do the trick for you. Okay. So on that note, the next step is to, of course, install php and mysql. And I'll warn you, this can be a little frustrating because there's so many different ways you could do it. Developers have all sorts of opinions about what that correct way is. So what I'm going to do is show you a handful of those options. And then I will recommend

Homebrew Setup on Mac3:43

ways you could do it. Developers have all sorts of opinions about what that correct way is. So what I'm going to do is show you a handful of those options. And then I will recommend one or two. All right. So let's start with the Mac. On the Mac, I'm a big fan of a tool called Homebrew. Here's instructions for how to install it. And then once it's available, you can install php by saying brew install php. Let me show you real quick. I'm going to copy this right here or click on the clipboard. Switch to the terminal that you picked in the last window. Again, I'm using one called Warp. And I will Command V and run that command. And yeah, that's now doing its thing. So let's give it just a minute. Okay, and that's complete. And then finally, notice we need to run these two commands. So I will copy them and paste it in. So why don't we test it out by running the command brew.

Okay, and that's complete. And then finally, notice we need to run these two commands. So I will copy them and paste it in. So why don't we test it out by running the command brew. And there we go. Let's now search for php. brew search php. And here's everything that pops up. And yeah, notice how we can install the latest version of php like I've already done. But if for some reason you also need an older version, that's an option as well. So in your case, you would say brew install php. And notice at the time of this recording, we're grabbing 8.1.4. All right, that took a few minutes, but it looks like it's done. And let's try it out. php -v for version. And sure enough, I get 8.1.4. Okay, let's try it again. But this time for MySQL, which will be our database. And I'll talk to you more about that in future episodes. brew install MySQL. Okay, and that's finally done as well.

Windows Install Options5:19

But this time for MySQL, which will be our database. And I'll talk to you more about that in future episodes. brew install mysql. Okay, and that's finally done as well. Let's test it out. There we go. So yeah, if you're on a Mac, or even Linux, actually, Homebrew is a nice and easy way to get these things installed on your machine. But what about Windows? Well, for Windows, a very popular tool these days is called Laragon. Just visit laragon.org, visit the download page, and you will want this version right here. And that'll get you up and running. It's a full UI, it's the full thing, it's the full deal. Otherwise, if you're familiar with WSL and WSL2, you might consider that. Maybe the entry point is a bit higher depending upon where you are in your learning. I would base your usage of this on if you know what it is. If you identify with this, and you think, oh, that's exactly what I need, then that's the way to go. Otherwise, if

Alternative Local Environments6:12

you are in your learning. I would base your usage of this on if you know what it is. If you identify with this, and you think, oh, that's exactly what I need, then that's the way to go. Otherwise, if this looks like gibberish, maybe skip over it. Of course, there's dedicated tooling like Docker, and there's wrappers around Docker. Again, it's a little advanced for where we currently are. You might consider a long standing tool called XAMPP. And there's also one called MAMP. MAMP works for Windows and Mac. These are traditional local environment ecosystems, so to speak. And they include everything you need to get up and running. So yeah, whether you install it manually with Homebrew, whether you pull in Laragon or XAMPP or MAMP, it doesn't exactly matter. So your job right now is to pick one of these. Again, I would recommend Homebrew and Laragon if you're on Windows. Pick one of these,

Code EditorsLocal EnvironmentsTerminals

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟