How to install Laravel 5.X

By | January 3, 2019

Hello Coders !! This tutorial is about How to install laravel 5.X in your ubuntu system using the terminal commands.

Laravel uses a composer for managing dependencies.

Step 1 : Install Composer

The first step is to install composer

The first and foremost thing is to make sure that you have a composer already installed in your local system. You can check this by typing “composer” in command.

Already installed composer should look like this.

composer-list

If a composer is not in there in your system.

Now you just need to visit the composer site you can find them below. You just need to go there and install it in your system.

https://getcomposer.org/download/

Stpe 2 : Install Laravel

The initial step for Laravel 5.X installation

Open the directory path in your terminal.

There is a possibility that you were unaware about your working directory. In your operating system ubuntu this directory structure will be like this “/var/www/html/(project)”.

The directory structure can depend on your local system setup.

composer create-project laravel/laravel --prefer-dist

Let’s write the folder name “laravel” therefor in the laravel folder the setup will be installed just like below screenshot.

installation

After the installation output of installation, the command is shows like above and is there is no error that means the Laravel framework successfully installed in the “laravel” directory.

Now move to installed Laravel directory.

cd-laravel

Step 3 : Database Setup

MySql database setup

Open the “.env” from the root directory and add the database credential there.

It will look like this

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=root
DB_PASSWORD=123

Here you can add your database name, username, and password, etc.

Step 4 : Composer Install

composer install

This command will install all the required dependencies.

Step 5 : Run Laravel

Let’s serve the Laravel using below typed command

php artisan serve
php-artisa-serve

Step 6 : Run Setup

You are almost ready now just follow this step.

Now copy the URL from the above screenshot and open that URL in the browser.

You can see the below screen, it implies Laravel has been installed successfully.

laravel-home-page

Congratulations you have successfully installed Laravel and now you know how to install Laravel 5.this. For more Laravel articles visit this Link

Here is the video link of the tutorial How to install Laravel 5.X:-

21 thoughts on “How to install Laravel 5.X

  1. Pingback: Razorpay Payment Gateway Integration - Laravel 5.x

  2. Pingback: Laravel 5 - How to create REST API Authentication using Passport? - < CodesCompanion >

  3. Pingback: Stripe Payment Gateway Integration Laravel 5.x - < CodesCompanion >

  4. Pingback: Google reCaptcha Integration in Laravel 5.x with an example

  5. Pingback: Email Verification in Laravel 5.7 - < CodesCompanion >

  6. Pingback: WOW Blog

  7. Pingback: Social Media LinkedIn login in Laravel 5.8 - < CodesCompanion >

  8. Pingback: Stripe payment gateway integration in laravel website.

  9. Pingback: Easy way to integrated razorpay payment gateway in laravel website.

  10. Pingback: Laravel Unlimited Hierarchical Category Tree View - < CodesCompanion >

  11. Pingback: How to upload files in amazon s3 bucket using Laravel - < CodesCompanion >

  12. Pingback: Laravel Image Optimization using Spatie - < CodesCompanion /> Package

  13. Pingback: Laravel 6 Dynamic database connection - < CodesCompanion /> Combined multiple databases

  14. Pingback: Laravel 5.x send reset password email to all users in bulk manually. - < CodesCompanion />

  15. Pingback: Authorize.net Payment Gateway Integration with Laravel - < CodesCompanion />

  16. Pingback: Paytm payment gateway integration with laravel 5.4 - < CodesCompanion />

  17. Pingback: Firebase RealTime Integration Laravel-5-x - < CodesCompanion />

  18. Pingback: Laravel stripe metered billing payment method - < CodesCompanion />

  19. Pingback: Hello World tutorial in Laravel with Vue js and vutiefy - < CodesCompanion />

  20. Pingback: laravel and vue js CRUD tutorial - < CodesCompanion />

  21. Pingback: Laravel + VueJS - Build a login and register web app

Leave a Reply

Your email address will not be published. Required fields are marked *