orchestra/lumen is a Laravel package for lumen framework for orchestra platform.
It currently has 4 GitHub stars and 17.204 downloads on Packagist (latest version v5.0.3).
Install it with composer require orchestra/lumen.
Discover more Laravel packages by orchestra
or browse all Laravel packages to compare alternatives.
Last updated
This repository contains the core code of the Orchestra Lumen. If you want to build an application using Orchestra Platform, visit the main repository.
First, install the Lumenate installer and make sure that the global Composer bin directory is within your system's $PATH:
composer global require "orchestra/lumenate=^1.0"
From within a working Orchestra Platform project, run the following command:
lumenate install
After installing Lumen, you can also opt to add the base Lumen application skeleton under lumen folder, you can do this by running:
lumenate make
You can also choose to add new path to autoload to detect lumen/app using PSR-4 or use a single app directory.
{
"autoload": {
"psr-4": {
"App\\": "app/",
}
},
"autoload-dev": {
"classmap": [
"tests/LumenTestCase.php",
"tests/TestCase.php"
]
},
"prefer-stable": true,
"minimum-stability": "dev"
}
It is recommended for you to set
"prefer-stable": trueand"minimum-stability": "dev"as bothlaravie/apiandtymon/jwt-authdoesn't have a stable release for latest Lumen yet.
Dingo API is preinstall with Lumen. To start using it you just need to uncomment the following from lumen/bootstrap.php:
require base_path('lumen/routes/api.php');
Install tymon/jwt-auth via the command line:
composer require "tymon/jwt-auth=^1.0"
Next, enable the following service providers from lumen/bootstrap.php:
$app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
// ...
$app->register(App\Lumen\Providers\AuthServiceProvider::class);
Next, we need to create a secret key for JWT:
php lumen/artisan jwt:secret
This would add JWT_SECRET value to your main .env file.
Finally you can extends the default App\User model to support Tymon\JWTAuth\Contracts\JWTSubject:
<?php
namespace App;
use App\Lumen\User as Eloquent;
class User extends Eloquent
{
//
}