orchestra/lumen 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

orchestra/lumen

最新稳定版本:v5.0.3

Composer 安装命令:

composer require orchestra/lumen

包简介

Lumen Framework for Orchestra Platform

README 文档

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.

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

统计信息

  • 总下载量: 17.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 4
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固