承接 smorken/ip-auth 相关项目开发

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

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

smorken/ip-auth

最新稳定版本:v10.5.0

Composer 安装命令:

composer require smorken/ip-auth

包简介

IP Authorization - not truly secure!

README 文档

README

Laravel IP Authorization

Contains some helpers for the basic IP Authorization. Note that IP addresses can be spoofed to some extent (mainly incorrect use of a proxy).

  • Service provider should be auto loaded but if not:

  • Add \Smorken\IpAuth\ServiceProvider::class to the config/app.php service providers

  • If needed, publish the config and view files

    • php artisan vendor:publish --provider="Smorken\IpAuth\ServiceProvider" --tag=views
    • php artisan vendor:publish --provider="Smorken\IpAuth\ServiceProvider" --tag=config
  • Add the middleware to your App\Http\Kernel.php

    /**
     * The application's route middleware.
     *
     * @var array
     */
    protected $routeMiddleware = [
        ...
        'ip-active'   => \Smorken\IpAuth\Http\Middleware\IpActive::class,
        'user-active' => \Smorken\IpAuth\Http\Middleware\UserActive::class,
        ...
    ];
  • Add the middleware key to your routes that need it
Route:middleware(['ip-active', 'user-active'])
    ->group(function () {
        Route::get('/', 'HomeController@index');
        Route::get('/customers', 'HomeController@customers');
        Route::post('/cart/{customer_id}', 'CartController@doCart');
    });
  • Add to config/menus.php
...
    'role-manage' => [
        [
            'name' => 'Authorize',
            'action' => [\Smorken\IpAuth\Http\Controllers\AuthorizeController::class, 'index'],
            'children' => [],
        ],
...

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-03