Spread the love

Laravel is most popular framework of PHP. It provides lots of in-build tools and library to build the web application. Laravel is used to to create robust custom web applications with ease of amazing developer experience.

Laravel is easily customizable and provides tools like ORM, Validation libraries, Queue, Mail, Routing, Schedulers, Views engines and Model view controller architecture.

Installing Laravel using composer

To install the Laravel using the composer there is few requirements which are below:

# Requirements:

  1. PHP 5.3.2+ for Laravel >= 5
  2. Php > 7.2.5 for Laravel 8
  3. BCMath PHP Extension
  4. Ctype PHP Extension
  5. Fileinfo PHP extension
  6. JSON PHP Extension
  7. Mbstring PHP Extension
  8. OpenSSL PHP Extension
  9. PDO PHP Extension
  10. Tokenizer PHP Extension

Read how to install extensions and php and What is composer and how to install composer?.

After checking the requirements, now we can start the installation.

First step is to open the command line in windows or terminal in Ubuntu and go to the folder where you want to install the Laravel. Most probably the directory of web server (var/www/html or htdocs)

$ composer create-project laravel/laravel example-app

here, example-app is the name of project.

This will show result as below

Getting error like below



PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted

then change composer memory limit and run composer update in example-app

 COMPOSER_MEMORY_LIMIT=-1  composer update

And the directory structure after installation

Laravel directory structure

Check the installation in browser by opening URL http://domain_ip/example-app/public

Leave a Reply