承接 dept-eduk/api-force-app-update 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dept-eduk/api-force-app-update

Composer 安装命令:

composer require dept-eduk/api-force-app-update

包简介

README 文档

README

This package provides migrations and middleware for locking access to the API where the app version has been blacklisted.

Pulling in with composer:

  1. Install the package: composer require e3creative/api-force-app-update

Customisation

The error message given by the middleware is customisable in config/api-force-app-update.php if you publish the package's config file: php artisan vendor:publish

How to Use

  1. Add the middleware to the $routeMiddleware property of your app/Http/Kernel.php:

    /**
     * The application's route middleware.
     *
     * These middleware may be assigned to groups or used individually.
     *
     * @var array
     */
    protected $routeMiddleware = [
     ...,
     'force_app_update' => \E3Creative\ApiForceAppUpdate\Middleware\ForceUpdate::class,
    ];
    
  2. Add the middleware to the routes you want to protect, or to the api middleware group in Kernel.php if you want it to be applied univerally to the api routes.

Route::resource('users', 'UserController')->middleware('force_app_update');
  1. Run the new migrations with php artisan migrate
  2. Blacklist versions by adding them into your blacklisted_versions table

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固