Introduction and What to Expect
Hello. Back in this Laravel video tutorial, we are going to learn how we can install Laravel 5.8. And after that, these are the major steps what we are going to do during this video. First of all, we will learn how we can install this Laravel 5.8, then run Laravel, and we will do the first change in Laravel and reflect on the browser also. And the file structure with Laravel 5.8, and we will also learn what is the major difference between 5.7 and 5.8.
And guys, if you are a very beginner in Laravel, then don't worry. You don't need to learn the previous version of Laravel 5.7 and 6 and all these, because in the latest version of the Laravel, there are just enhancements. Most of the, around 95% of Laravel is similar in 5.6, 5.7, and 5.8. Just some enhancements are there that will be shown here. Okay. So now, first of all, how we can install Laravel 5.8?
Prerequisites and Installation Methods
For that, we have to go on the Laravel official site. After that, just click on the documentation. I will show you everything step by step with the official site. Okay, so here you can see the installation. So guys, before that, you must have to install Composer. If you don't know how to install Composer, the link is given in the description box also, because if I'm going to show you how to install Composer, then it will going to be a very long video.
Okay, so first of all, just need to check Composer in your command line. If Composer is installed, then it will tell you the Composer version and everything. Otherwise, it will give you a kind of error. Okay, so it will show that the Composer is installed, the Composer version is 1.6. Okay, so that's fine. So let's clear this video.
Now, first command is used for the download the Composer global file, download Composer globally. It will help you to install every new project very quickly. Otherwise, every large project will take your time. If you don't want to install that globally, then you can run this command, which is the composer create-project, but it will take some extra time, every extra time, every time. Okay? And once you install this globally, then you have to just run that one command and it will be very quickly. Okay?
So I already installed my Composer globally, so I'm just going to show you that how you can do that. Otherwise, it will take some time. Okay. So I'm not going to run this, but it will... this is a simple command and after that, it will be just installed Laravel and nothing more than that. Okay. So for the saving time, I am not going to install it again. So just clear the screen and now you have to create the new project. For the installation, the command is very simple, which is laravel new blog-5.8. That's why I'm going to write a new blog-5.8. Okay? And just hit the enter, and within some moment you will see that the new project will be created. Okay.
Running the Application Server
And after that, we will learn how we can do the changes and all things. Okay. So this is going to install. Within that time, I'm going to tell you how you can find the new changes. If you are very familiar with the old versions, then go to the prologue and here you will find the old kind of changes here. Okay. So here you will find the release note and upgrade guide, contribution, and how you can use the API documentation and all. Okay. So everything is given here. If you are just click on that, then you will find out everything. And within that time, you will see that the library installed very quickly. Okay.
So now I'm going to show you that how we can run this in the browser. Okay. So first of all, just go to the blog-5.8 and just run here php artisan serve. And it will show you that Laravel development deployment server started here. Okay, just click on here and you will see that Laravel is opened here. Okay, so you don't need to put it on the www folder, and that you have to run that. You can just simply run with that. Okay. So now I am going to eat in the folder. So just moving it, just go here and open the folder, desktop and log, and just open it.
Making Your First Change in a View
Okay. So these are the... I'm going to little bit zoom out. These are the folder structures. We will go for the folder structure. Before that, I'm going to show you what we have to do for the first change. Just find your welcome.php file, sorry, welcome.blade.php file. Okay. Okay. So just change here Laravel to Laravel 5.8 and refresh the page, then you will see that this is the change. Okay. So where you will find? You will find inside the resources and views. Okay.
Exploring the Laravel Directory Structure
So now just discuss about the directory structure. So first of all, the app folder. App folder is your major folder where you will write your controller, middleware here, okay? And you will find and write your model also here. The user model is here, you can see that. Okay. So after that, the second thing is the bootstrap. Sometimes you have to install the libraries and you have to write your library name here so that you can boot your file from here. Okay. So this is not for, if you are a beginner, then you don't need to take the headache about that. Okay.
This is the config file. Here you have to configure database, cache, broadcasting, and everything. For example, I'm going to open the database, then you have to write your ENV name and all these things. Okay. So you can write your connections here, okay? That will help you to the connection with the database, migration or all these things. We will discuss all the every single task and every folder in the next upcoming videos.
public folder help for the write the JS and CSS and style and images. The resources folder will be help you to the showing the view, localization, and all these things. routes for defining the router. Therefore, these are the default routes. You can see that the welcome. Okay. And the storage is for downloading the folder. tests for write the tests. This is vendor folder used for the Composer files. And .env file shows you that this is the environment file and here you can write the DB password, username and all these things. Okay. So these are some other file, like the composer.json file that tells you that how many packages and what are the package dependencies you are using in your projects. Okay, fine. So these are the basic structure about how we can use Laravel, how we can install Laravel.
Customizing the Server Port and Conclusion
Let's say you don't want to serve it on any particular port, then you can also customize it. So let's try it. I didn't remember, but let's try what is the command. So if I just stop it, then I can write here php artisan serve --port=9000 and let's hit the enter. Okay, so we are now able to serve it in the 9000 port. Okay, because we closed the last one, that's why this is also closed. So if you want to run on two ports, then you can also do that. Just right here, php artisan serve, and now you will see that you are able to run this on both ports. Okay.
So thanks guys, thanks for watching this video. Don't forget to subscribe our channel. Please like this video and please keep in touch for more videos. We are showing you about the Laravel 5.8. And if you have any kind of question, you can ask me in the comment box also. Sometimes I'm watching this.