PHPackages                             orchestra/lumen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. orchestra/lumen

ActiveLibrary[Framework](/categories/framework)

orchestra/lumen
===============

Lumen Framework for Orchestra Platform

v5.0.3(6y ago)417.2k3[1 PRs](https://github.com/orchestral/lumen/pulls)5MITPHPPHP &gt;=7.2.5

Since Oct 13Pushed 4y ago2 watchersCompare

[ Source](https://github.com/orchestral/lumen)[ Packagist](https://packagist.org/packages/orchestra/lumen)[ Fund](https://paypal.me/crynobone)[ Patreon](https://www.patreon.com/crynobone)[ RSS](/packages/orchestra-lumen/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (78)Used By (5)

Lumen Framework for Orchestra Platform
======================================

[](#lumen-framework-for-orchestra-platform)

This repository contains the core code of the Orchestra Lumen. If you want to build an application using Orchestra Platform, visit [the main repository](https://github.com/orchestral/platform).

[![Build Status](https://camo.githubusercontent.com/78593b1b563e335e1a4dc0151a48ff9e3bb12e7ec2c9a114c85e72fbfc2c1a82/68747470733a2f2f7472617669732d63692e6f72672f6f72636865737472616c2f6c756d656e2e7376673f6272616e63683d342e78)](https://travis-ci.org/orchestral/lumen)[![Latest Stable Version](https://camo.githubusercontent.com/f9a1dafccaa49d1c683c764e93217c1004149895a207c51a9d70a98b042f1646/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f6c756d656e2f76657273696f6e)](https://packagist.org/packages/orchestra/lumen)[![Total Downloads](https://camo.githubusercontent.com/342b9ee999c8d13f1e22fc09c60cb9d915fc1bf6caaccece4aec46c56375ce4f/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f6c756d656e2f646f776e6c6f616473)](https://packagist.org/packages/orchestra/lumen)[![Latest Unstable Version](https://camo.githubusercontent.com/8b4e9f924518b0daefdae2a0ff352cea0c3ddecf989350c75920d0a62be10053/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f6c756d656e2f762f756e737461626c65)](//packagist.org/packages/orchestra/lumen)[![License](https://camo.githubusercontent.com/59db7e1be50a4b36a4479121fab80674ba11e1572ff72cc11f64618d85cf8a46/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f6c756d656e2f6c6963656e7365)](https://packagist.org/packages/orchestra/lumen)

- [Installation](#installation)
- [API Routing](#api-routing)
- [JWT Authentication](#jwt-authentication)

Installation
------------

[](#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 both `laravie/api` and `tymon/jwt-auth` doesn't have a stable release for latest Lumen yet.

API Routing
-----------

[](#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
------------------

[](#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`:

```
