In this tutorial we will see how to install the latest Lumen (micro-framework by Laravel) in windows with xampp.
Before installing the Lumen, please make sure you have the server matching the following requirements:
- PHP >= 7.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
We can install the Lumen in two ways:
- Via Composer Create-Project
- Via Lumen Installer
Using composer to install the Lumen make the dependency management very easy. Make sure you have composer installed on your machine.
Via Composer Create-Project
Go to your project folder. (xampp> htdocs) in my case. You can install the Lumen by Composer “create-project” command. Open your terminal and navigate to project directory and run below command:
composer create-project --prefer-dist laravel/lumen lumen-exception
Via Lumen Installer
You need to download the Lument installer first by running below command:
composer global require "laravel/lumen-installer"
then you can install Lumen with below command:
lumen new lumen-exception
Above command will create a new folder called “lumen-exception” and install the Lumen inside it. On completion you can check the downloaded source of Lumen. It has below directory structure:
Lumen stores all the configuration options in a file called “.env” file. Open this file and provide the value for the APP_KEY variable in. You can provide any random string which should be 32 characters long.
For example: ae2783e1a58024cd21d154c0a2d48789
This APP_KEY is used for the encryption of data in application.
Now navigate to your project URL: http://localhost/lumen-exception/public/ If you see the below message, it means we have successfully installed the lumen:
Lumen (5.5.2) (Laravel Components 5.5.*)
That’s it!! Lumen is installed successfully. If you are facing any issue then please send me your issue on my email : firstname.lastname@example.org