orchestra / lumen
Lumen Framework for Orchestra Platform
Installs: 17 198
Dependents: 5
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 3
Open Issues: 1
Requires
- php: >=7.2.5
- laravie/api: ^4.0
- nikic/fast-route: ^1.3
- orchestra/foundation: ^5.0
Requires (Dev)
- mockery/mockery: ^1.3.1
- phpunit/phpunit: ^8.4 || ^9.0
Suggests
- laravel/tinker: Required to use the tinker console command (^2.0).
- nyholm/psr7: Required to use PSR-7 bridging features (^1.2).
- symfony/psr-http-message-bridge: Required to use PSR-7 bridging features (^2.0).
- tymon/jwt-auth: Allows to use JWT-Auth support (^1.0).
- dev-master / 6.0.x-dev
- 5.x-dev
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- 4.x-dev
- v4.6.0
- v4.5.0
- v4.4.1
- v4.4.0
- v4.3.1
- v4.3.0
- v4.2.1
- v4.2.0
- v4.1.0
- v4.0.0
- 3.8.x-dev
- v3.8.9
- v3.8.8
- v3.8.7
- v3.8.6
- v3.8.5
- v3.8.4
- v3.8.3
- v3.8.2
- v3.8.1
- v3.8.0
- 3.7.x-dev
- v3.7.2
- v3.7.1
- v3.7.0
- 3.6.x-dev
- v3.6.4
- v3.6.3
- v3.6.2
- v3.6.1
- v3.6.0
- 3.5.x-dev
- v3.5.4
- v3.5.3
- v3.5.2
- v3.5.1
- v3.5.0
- v3.5.0-BETA1
- 3.4.x-dev
- v3.4.4
- v3.4.3
- v3.4.2
- v3.4.1
- v3.4.0
- 3.3.x-dev
- v3.3.2
- v3.3.1
- v3.3.0
- v3.3.0-BETA2
- v3.3.0-BETA1
- v3.2.9
- v3.2.8
- v3.2.7
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.2.0-BETA1
- v3.1.9
- v3.1.8
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
This package is auto-updated.
Last update: 2024-10-28 12:56:55 UTC
README
This repository contains the core code of the Orchestra Lumen. If you want to build an application using Orchestra Platform, visit the main repository.
Installation
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": true
and"minimum-stability": "dev"
as bothlaravie/api
andtymon/jwt-auth
doesn't have a stable release for latest Lumen yet.
API Routing
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');
JWT Authentication
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 { // }