An Introduction to Lumen Framework


An Introduction to Lumen Framework
An Introduction to Lumen Framework

Lumen is micro-framework by Laravel.It is developed by creator of Laravel Taylor Otwell for creating smart and blazing fast API’s.Lumen is built on top components of Laravel.
As Lumen is a micro-framework not a complete web framework like Laravel and used for creating API’s only, so most of components as HTTP sessions, cookies, and templating are excluded from Lumen and only features like routing, logging, caching, queues, validation, error handling, database abstraction, controllers, middleware, dependency injection, Blade templating, command scheduler, the service container and the Eloquent ORM are kept.

Benifits of using Lumen framework:

  • It is faster .
  • Some configurations which have to write in laravel are predefined in Lumen framework.
  • Lumen is smaller than laravel framework.
  • Lumen code can also be used in laravel. The structure of code of Lumen and laravel is same.
  • The components used in lumen is same as that of laravel. So that if you have knowledge of using laravel then it is much easier for you to learn lumen framework
  • Lumen framework will maximize the performance of the program.

Server Requirements for Installing Lumen Framework

Laravel Homestead virtual machine statisfied all server requirements for Lumen,but if you are not using Homestead, you will need to make sure your server meets the following requirements:

  • PHP version on server must be greater than or equal to 5.6.4
  • OpenSSL PHP Extension need to be installed and enabled
  • PDO PHP Extension need to be installed and enabled
  • Mbstring PHP Extension need to be installed and enabled

Installing Lumen Framework via Installer

To install Lumen via installer first, download the Lumen installer using Composer by running below command.

composer global require "laravel/lumen-installer"

Once Lumen installer is downloaded , you can create a new Lumen project by running below command.

lumen new blog

The above command will create a new directory named blog in your present working directory and install the framework in it.

Installing Lumen Framework via Composer Create-Project command

You can also install the Lumen framework by running composer Create-Project command. Below are sample usage for same.

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

Thank You!

You can read more

One thought to “An Introduction to Lumen Framework”

Leave a Reply

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