What is Lumen? If you need to answer this question with one statement then you can say “Lumen is a fast micro-framework by Laravel and is used to develop high-speed micro-services and API development.“
Introduction
Lumen is majorly used to develop APIs and web services. Lumen is Laravel’s micro framework that was created by Laravel’s creator i.e. Taylor Otwell. You can check all the releases here Release Notes – Lumen – PHP Micro-Framework By Laravel.
Lumen is a micro framework which means it is a fast and small version of the web framework. PHP has other two frameworks named slim and silex.
Install Lumen
Lumen use composer to install all its dependencies. So, before you start you have to install composer first. If you don’t know how to install composer follow the article here Install Composer on Linux and Windows in 3 Steps.
Some server requirements to install Lumen are,
- PHP 7.3 (for the newer Lumen version)
- PDO PHP Extension
- OpenSSL PHP Extension
- Mbstring PHP Extension
You can install Lumen, like laravel by pulling it from global.
1 2 |
composer create-project --prefer-dist laravel/lumen blog |
After the complete installation, if you use a local server or any built-in PHP server then run the below command,
1 |
php -S localhost:8000 -t public |
Some Major Points About Lumen
- Lumen is the micro-framework for web applications that are used to create microservices or APIs.
- It is a smaller and lighter part of Laravel.
- On the integration part, it supports third-party integrations like any payment gateway or security packages like JWT.
- It handles a number of requests more than Laravel.
- Also, response time is very less compared to Laravel.
- Lumen is majorly used for its speed.
Conclusion
Lumen is a trimmed version of laravel to increase its speed. It does not create problems with major tasks like views, sessions, routing, etc. So here we learn about Lumen, its major use, and its installation on our local server.
Hope you will understand, if you have any questions let me know.
Also Read:
- Load Dynamic Content in Bootstrap Modal using Ajax
- Create Dynamically Generated Text File and Download Using JavaScript
- What are Traits in PHP And Its Use With Example
- How to Use Expression of Multiline String in PHP
Happy Coding..!