1 00:00:00,510 --> 00:00:03,750 To start using Laravel, you'll need Composer. 2 00:00:03,750 --> 00:00:08,840 A PHP development tool that manages packages and libraries on your computer. 3 00:00:08,840 --> 00:00:11,490 Check the teacher's notes to learn more about Composer. 4 00:00:12,790 --> 00:00:16,178 You'll also need a local development environment such as MAMP. 5 00:00:16,178 --> 00:00:19,080 Which we'll be using throughout this course. 6 00:00:19,080 --> 00:00:24,690 Besides Composer and MAMP, you'll need a code editor like Visual Studio Code, 7 00:00:24,690 --> 00:00:27,150 which is what I'll be using in this course. 8 00:00:27,150 --> 00:00:30,116 If you need some help, check the teacher's notes below for 9 00:00:30,116 --> 00:00:31,967 instructions on how to set those up. 10 00:00:34,191 --> 00:00:37,130 It's time to install Laravel. 11 00:00:37,130 --> 00:00:40,064 First, make sure you have MAMP started. 12 00:00:40,064 --> 00:00:43,303 Showing green dot indicating that the Apache and 13 00:00:43,303 --> 00:00:46,860 MySQL servers are both up and running. 14 00:00:46,860 --> 00:00:48,320 If you're using Windows, 15 00:00:48,320 --> 00:00:52,010 check the teacher's notes on how to install XAMPP and Git Bash. 16 00:00:53,220 --> 00:00:57,925 Next, create a new directory where you want to keep your Laravel applications. 17 00:00:57,925 --> 00:01:03,071 For this example, create a new folder inside of 18 00:01:03,071 --> 00:01:08,741 MAMP in the htdocs directory named laravel_apps. 19 00:01:11,776 --> 00:01:17,080 When creating a new project, you can name your working directory whatever you like. 20 00:01:17,080 --> 00:01:20,811 Finally, open the terminal and navigate your working directory. 21 00:01:20,811 --> 00:01:22,545 By typing cd, space and 22 00:01:22,545 --> 00:01:27,070 dragging the working directory into the terminal like this. 23 00:01:28,340 --> 00:01:31,480 This will reveal the path of your working directory, 24 00:01:31,480 --> 00:01:33,190 making it super easy to navigate. 25 00:01:34,190 --> 00:01:39,529 Once you hit Enter, you can see that you are indeed in the laravel_apps directory. 26 00:01:42,597 --> 00:01:47,582 The create-project command tells Composer to create a new project from an existing 27 00:01:47,582 --> 00:01:48,220 package. 28 00:01:49,242 --> 00:01:52,490 The --prefer-dist flag tells Composer to download and 29 00:01:52,490 --> 00:01:57,550 unzip archives of the dependencies using GitHub or another API. 30 00:01:57,550 --> 00:02:00,480 Which speeds up the downloading of dependencies. 31 00:02:00,480 --> 00:02:05,315 Check the teacher's notes below for more on APIs such as GitHub. 32 00:02:05,315 --> 00:02:11,011 laravel/laravel indicates that this type of project,is a Laravel project. 33 00:02:11,011 --> 00:02:14,030 Finally, treehouse is the name of the project. 34 00:02:14,030 --> 00:02:17,172 But feel free to use whatever name you'd like for your project name. 35 00:02:19,953 --> 00:02:26,320 After the Laravel project has been created, move back into the terminal, 36 00:02:26,320 --> 00:02:32,200 and into the project directory, like this, cd treehouse, Enter. 37 00:02:32,200 --> 00:02:35,540 Now you can see that we've moved from the laravel_apps directory 38 00:02:35,540 --> 00:02:37,160 into the treehouse directory. 39 00:02:38,370 --> 00:02:41,494 To open your project in Visual Studio Code on a Mac, 40 00:02:41,494 --> 00:02:46,304 drag your project folder into the Visual Studio Code icon located in the dock. 41 00:02:51,903 --> 00:02:55,743 Alternatively, you can also open the terminal. 42 00:02:55,743 --> 00:02:58,445 Then type code, space, period, 43 00:02:58,445 --> 00:03:04,650 Enter to open Visual Studio Code in your current working directory. 44 00:03:04,650 --> 00:03:07,740 If your copy of Visual Studio Code didn't open, or 45 00:03:07,740 --> 00:03:10,380 if you're using Windows, check the teacher's notes 46 00:03:10,380 --> 00:03:15,130 on how to install the shell command in Visual Studio Code for Mac and Windows. 47 00:03:16,880 --> 00:03:18,350 We're off to a great start. 48 00:03:18,350 --> 00:03:25,350 But first we need to create a new user and matching database using phpMyAdmin. 49 00:03:25,350 --> 00:03:29,280 In the next section, after we create our user and database, 50 00:03:29,280 --> 00:03:34,130 we'll use Artisan to ensure that our database is connected to our application.