Table of Contents
Laravel becomes more powerful and rapid framework day by day. Currently they launched laravel 5.8 version.
Its very easy to install laravel in localhost for experience developer who have worked on prior version of laravel.
New developer can follow below steps to install laravel in localhost. Lets start step by step.
Here are server requirements for installing laravel 5.8
- PHP >= 7.1.3
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
- BCMath PHP Extension
Make sure you have already installed composer in your system. If you haven’t installed in your system, then please check this tutorial.
Now install Laravel by issuing the Composer create-project command in your terminal:
composer create-project --prefer-dist laravel/laravel lara58
Start local development server
Now use the serve Artisan command to serve your application. This command will start a development server at http://localhost:8000
php artisan serve
Open your browser and navigate to http://localhost:8000/. If everything is working, you’ll see a welcome page. Later, when you are finished working, stop the server by pressing Ctrl+C from your terminal.
Awesome, you have successfully installed laravel in localhost.
Database Configuration In Laravel
Open http://localhost/phpmyadmin [You must enable your local server.] and create new database in it using below query.
CREATE DATABASE lara_test;
Now open .env file from your lara58 folder and update the setting as below.
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=lara_test DB_USERNAME=root DB_PASSWORD=
That’s it. You have successfully configured your database setting.
Last Words…
I hope you enjoyed this tutorial. If you haven’t understand any part of this tutorial. Please drop comment, I will surely help to understand you. Please like and share this tutorial with your friends. 😉
Hello Chintan,
Thank you for this tutorial its really easy to install and configure the database in laravel using your tutorial.
Thank You Mayur 🙂