Laravel 6 Tutorial for Beginners #2 - Installing Laravel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay that my friends so there is a little bit of initial setup when it comes to using laravel to create websites and there's several different ways to go about it but do not let that put you off it's pretty simple and I'm going to run through all the steps that you need to take so first of all you'll need PHP our my sequel installed on your computer now an easy way to do that on Windows is to install zamp or xampp and if you don't know how to do that definitely check out my PHP and my sequel series because they go into depth on how to set that up in that series the link is gonna be down below and ideally for things to run smoothly in this course I would recommend that you get the latest version of zamp which has the latest version of MariaDB in it as well and that's important when it comes to communicating with our database so definitely get the latest version of this install it on your computer and make sure everything works so next we're going to need to install composer and composer is a package or dependency manager for PHP it allows us to basically install PHP packages or libraries into our projects for example we could install some kind of date package which would help us format dates now laravel itself is also just a package which in turn depends on other packages so what we're going to do is install composer to manage all of that for us it's a little bit like NPM for node but in PHP we have composer right so what you want to do is click on download and then you can download the composer installer right up here and that's going to configure everything for us out of the box so click on this link to do that and it's also going to add composer to the path variable so we can use anywhere on our computer but if you want to do it manually you could do as well by copying and pasting this code or right here into your terminal and then manually configuring the path variable yourself so make sure you have PHP and my sequel installed and also compose it as well before you carry on okay then so hopefully now you have everything installed and we can go ahead and create a laravel project so first things first open up some kind of terminal I'm going to open up command prompt I'm gonna say first of all composure and then - capital V just to make sure that composure is installed on my computer and you should see a version number if you don't it means you've not installed it correctly so try doing that again before you carry up okay so next what we need to do is install laravel onto our computer so that we can easily generate new laravel projects and the way we do that is using composer so we say composer and then global meaning we're installing this globally on our computer and by the way make sure this is not in capitals so composer and then global and then require we're going to require a package and that is laravel forward slash installer so this is going to install the laravel installer package and globally on our computer and that means that we can use that then to create new laravel projects wherever we want in any directory so what I'm going to do is CD into the documents directory and by the way CD stands for change directory so this means it's going to jump into the documents directory if I wanted to go up a level I'm going to say CD space dot that takes me out of the documents back into short so I'm going to see the inter documents again and then I'm going to go into a fold inside this folder called a laravel and this is where I'm going to create my project now to do that we can say laravel which we have access to now because we installed this package up here and we create a new project by saying new and then the project name now I'm gonna call this pizza house you can call it what you want but the project we're creating is called pizza house so press enter and this is going to take a little bit of time to create the first time you do it but less time thereafter but anyway once it's done then just CD or go into the project directory okay then so once that is installed just CD into the project directory that you just created I call it pizza house so let's see the internet and then from here I want to open up a text editor in this directory of es code now to do that using vs code on Windows I can just say code and then dot to me in this current directory and that opens vs code in this directory format it's opened it on my other screen so let me just scoot it over here or you could just open up the directory manually from whatever code editor you'll use it so what I'm going to do now is actually just close this terminal because vs code comes baked with its own terminal and I'm going to use that but if you don't have that you can keep this open if you like because we are going to be using the terminal later on I'm going to close it and I'm going to open up this terminal over here by going to terminal and new terminal now over here all you need to do to see this website because we want to see in a browser right these are all the codes that make up the website but we want to see it we want to preview it we can use something called artists on now artists on is a command line interface included with laravel and it's got many different features one of them is to spin up a development service so that we can preview our project but it's also going to help with other things in the future as well so the way we use artists aren't to spin up a development server is by first of all making sure we're in the correct directory pizza house that's what this up is called then we say PHP and then art is up and then serve and this creates a development server for us right here is the link so I can control click to open up it's opened on my other screen so let me just move across over here and this is the new era veldt project this is kind of like the dummy project that comes along for the ride every time you create a new laravel project so there's a lot of different folders and a lot of different files in those folders which could be a little off-putting when you first start a project but don't worry we're going to talk about most of this as we go through the course and that's going to start in the very next lesson
Info
Channel: The Net Ninja
Views: 84,450
Rating: undefined out of 5
Keywords: laravel, laravel 6, tutorial, laravel tutorial, laravel 6 tutorial, laravel tutorial for beginners, laravel 6 tutorial for beginners, laravel for beginners, laravel tips, beginners, laravel basics, laravel crash course, crash course, composer, install laravel, laravel introduction, composer php, composer npm, php npm
Id: E74_WZpjeKA
Channel Id: undefined
Length: 6min 24sec (384 seconds)
Published: Wed Feb 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.