How to install laravel
Quick and Easy Laravel Installation Guide
Laravel is a web app framework with elegant or expressive syntax by easing the common tasks of making web projects such as caching, sessions, routing, and authentication. The framework is accessible, have potent tools which make the applications robust. Here, you also get tightly integrated unit testing, powerful migration system, control container, etc.
The advancements in the technology and the rise in the improvements have made Laravel a burning topic among the developers. Also, it has been observed an increase in the Laravel Interview Questions these days. If you are a tech geek, wish to learn more about this technology, then the first step here is the installation guide of Laravel.
In this article, we will cover 3 things that will help you in the laravel installation process.
- Server requirements
- Installation process
1. Server Requirements for Laravel framework
- PHP version >= 7.1.3
- Mbstring PHP Extension.
- Tokenizer PHP Extension.
- OpenSSL PHP Extension.
- XML PHP Extension.
- AllowBCMath PHP Extension.
- Ctype PHP Extension.
- JSON PHP Extension.
- PDO PHP Extension.
2. Installation guide of Laravel
To install Laravel, we need to install composer first.
Composer: It is a tool that manages all dependency in PHP. It allows us to declare all the libraries of our project depends on and it will manage update/install them for us.
How to install Composer
You can download composer from https://getcomposer.org/download
How to install Laravel by composer
Step1. Open cmd.
Step2. Goto your htdocs folder
(in case you are having xampp) or www folder (in case you are having wamp server)
Step 3. Execute
composer create-project laravel/laravel project name
// Here project name is your project directory, and all files will install under this folder.
Step4. With this command, it will install by default latest version of Laravel like 5.8
If you want a particular version of Laravel, then you have to mention that version after project name just like.
composer create-project laravel/laravel projectname "5.7"
After this command execution, this is something look like. Now it is installing all its dependencies & laravel libraries.
Take a look at Laravel interview question and crack your future interviews. You can get a detailed explanation of the question with the coding part by reaching an online collection of questions at Best Interview Question.
Step5. Now laravel successfully installed on your system.
After the installation of the Laravel application, It is automatically set its application key random string in the .env file.
In this part, various things are included like
- Configuration Files
- Directory Permissions
- Application Key
- Additional Configuration like (cache, session, database)
- Public Directory
After installing Laravel application on your local server, you can set you a local environment in a .env file like your database name, hostname, username, and password, etc.
Now you are able all set to develop your desired code and get your application program complete.
If you are looking for new jobs in Laravel then it is the right place. You can find here all common and advanced laravel interview questions