betalabs/engine-laravel-helper 问题修复 & 功能扩展

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

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

betalabs/engine-laravel-helper

最新稳定版本:v5.0.1

Composer 安装命令:

composer require betalabs/engine-laravel-helper

包简介

Engine Laravel Helper provides essential functionalities to work with Engine apps on Laravel.

README 文档

README

This package provides essential functionalities to work with Engine apps on Laravel.

Features

  • Passport configured by default
  • Tenant management
  • Application genesis process
  • App deploy command for deploy application

Requirements

  • PHP 7.1.3+
  • Laravel 5.6
  • Passport 6.0+

Installation

  1. Install the package via composer
$ composer require betalabs/engine-laravel-helper
  1. Import package files to your Laravel project
$ php artisan vendor:publish --provider="Betalabs\LaravelHelper\LaravelHelperServiceProvider"
  1. Register package routes to your RouteServiceProvider:
/**
 * Define the routes for the application.
 *
 * @return void
 */
public function map()
{
    $this->mapApiRoutes();

    $this->mapWebRoutes();

    \Betalabs\LaravelHelper\LaravelHelper::routes();
}
  1. Register Passport routes to your AuthServiceProvider:
/**
 * Register any authentication / authorization services.
 *
 * @return void
 */
public function boot()
{
    $this->registerPolicies();

    \Laravel\Passport\Passport::routes();
}
  1. In your config/auth.php configuration file, you should set the driver option of the api authentication guard to passport and the users provider model to our Tenant model. This will instruct your application to use Passport's TokenGuard when authenticating incoming API requests:
'guards' => [
    'api' => [
        'driver' => 'passport',
        'provider' => 'users',
    ],
],
'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => \Betalabs\LaravelHelper\Models\Tenant::class,
    ],
],
  1. And finally
$ php artisan app:deploy

统计信息

  • 总下载量: 9.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-17