Git Product home page Git Product logo

lumen's Introduction

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.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

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

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
{
    //
}

lumen's People

Contributors

crynobone avatar taylorotwell avatar grahamcampbell avatar driesvints avatar themsaid avatar chimit avatar thybag avatar antonkomarev avatar carusogabriel avatar gmsantos avatar jasonlewis avatar kieranbrown avatar lloricode avatar troydavisson avatar zakhenry avatar scrubmx avatar owenvoke avatar molteber avatar lukasgeiter avatar martinssipenko avatar lidbetter avatar fire015 avatar jensdenies avatar jaoued avatar stevenwadejr avatar sahanh avatar arrilot avatar martinparrish avatar lvismer avatar larsgrevelink avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.