API tutorial for beginners takes you through how to install laravel lumen. Laravel lumen is one of the most powerful api creation platforms out there. You don't need to have known have to code Laravel php framework, to be able to take this laravel lumen tutorial
Server Requirements
The Lumen framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Lumen development environment.
However, if you are not using Homestead, you will need to make sure your server meets the following requirements:
PHP 5.6.4 or higher
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Installing Lumen
Lumen utilizes Composer to manage its dependencies. So, before using Lumen, make sure you have Composer installed on your machine.
Via Lumen Installer
First, download the Lumen installer using Composer:
composer global require "laravel/lumen-installer"
Make sure to place the ~/.composer/vendor/bin directory in your PATH so the lumen executable can be located by your system.
Once installed, the lumen new command will create a fresh Lumen installation in the directory you specify. For instance, lumen new blog will create a directory named blog containing a fresh Lumen installation with all of Lumen's dependencies already installed. This method of installation is much faster than installing via Composer:
lumen new blog
Via Composer Create-Project
You may also install Lumen by issuing the Composer create-project command in your terminal:
composer create-project --prefer-dist laravel/lumen blog
Serving Your Application
To serve your project locally, you may use the Laravel Homestead virtual machine, Laravel Valet, or the built-in PHP development server:
php -S localhost:8000 -t public
Configuration
All of the configuration options for the Lumen framework are stored in the .env file. Once Lumen is installed, you should also configure your local environment.
Application Key
The next thing you should do after installing Lumen is set your application key to a random string. Typically, this string should be 32 characters long. The key can be set in the .env environment file. If you have not renamed the .env.example file to .env, you should do that now. If the application key is not set, your user encrypted data will not be secure!
Тэги:
#Laravel #Lumen #API #Micro_services #Installation #setup #homestead #architecture #microservices_architecture #spring_microservices #microservices_tutorial #java_microservices #spring_boot_microservices #microservices_martin_fowler #tutorial_laravel #laravel_5 #laravel_php #laravel_5_tutorial #laravel_5.3 #install_laravel #laravel_5.2 #laravel_4 #laravel_5.4 #laravel_login #crud_laravel #laravel_framework #laravel_lumen_tutorial #laravel_lumen_microservice #lumen_microservice