
Project Setup and creating first Laravel application
Laravel is a free and open-source PHP web framework that follows MVC architecture. It was created by Taylor Otwell and this framework is based on Symfony.
Laravel is one of the best programming languages that students have to learn for starting their career in IT industry. It is easier to learn than other backend frameworks such as node js, Django, .net, etc. It follows MVC architecture. So, it will be helpful for you to understand any other frameworks too.
You can read about the roadmap for learning Laravel in this github repository. Just follow the link to read the roadmap for learning Laravel. We will be covering the requirements for creating your first Laravel application in this article.
Requirements for Laravel setup
First of all, you should have a web server installed in your computer. You can use xampp or wamp as you server.
Read Also: How to install wordpress on localhost using XAMPP?
You should also have composer installed in your device. If it is not installed, you can install it from https://getcomposer.org/download/.
Once Xampp and composer installed in your device, goo to htdocs directory of your xampp and open terminal.
For creating your first Laravel application, just simply create a project using the code
composer create-project laravel/laravel testapplication
It will install the necessary packages and all other libraries required for Laravel application.
Once the installation process is complete, move to testapplication directory and type command
php artisan -v
for checking the version of Laravel installed in the project.

Now open your favourite code editor and just take a view at the directory structure.

1. The app directory contains all the controllers, models, middlewares and other directories. This is the central part of the application, where all the backend code is written.
2. Bootstrap directory is the directory loaded during the application’s startup. You can open the files and study the code but make sure that you do not change any code in this directory files.
3. Config directory contains all the configuration files of your application. The files of this directory also should not be changed without expert knowledge.
4. The Database directory contains the migrations, seeders and factories files for your application.
5. The public directory is the directory where all the static files are stored.
6. The resources directory is the view or frontend directory of your application.
7. The routes directory contains routes for your application.
8. Other directories also have their own importance, you will learn this after practicing. This much knowledge is sufficient for running your first Laravel application.
After studying all the directories, open .env file. This is the file where all your environment variables are stored. Create an empty mysql database and write the name of the database in DB_DATABASE variable. Then run the command php artisan config:clear for clearing the configuration settings.
Now migrate your databases using command php artisan migrate. This migrates all your tables in the database that you created in previous step.
Now you are ready to run your first Laravel application.
Type the command php artisan serve in your terminal and your first Laravel application is ready and opens as below.

Now you can go to resources/views/welcome.blade.php file and make changes and study the code structure.
Similarly, for creating new page, you can make a new route in routes/web.php file and work on. We will cover all those topics in next article.
Happy Coding!