Package Data | |
---|---|
Maintainer Username: | crynobone |
Maintainer Contact: | crynobone@gmail.com (Mior Muhammad Zaki) |
Package Create Date: | 2015-05-03 |
Package Last Update: | 2022-03-23 |
Home Page: | https://packagist.org/packages/orchestra/lumen |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:15:34 |
Package Statistics | |
---|---|
Total Downloads: | 17,198 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 4 |
Total Watchers: | 4 |
Total Forks: | 3 |
Total Open Issues: | 1 |
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=~0.4"
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": true
and"minimum-stability": "dev"
as bothlaravie/api
andtymon/jwt-auth
doesn'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('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
{
//
}