joshwhatk/sentinel-guard

Laravel Guard for Cartalyst's Sentinel

v1.0.1 2016-04-11 14:23 UTC

README

#Cent (为 无状态 Sentinel 实现的认证守护者) v1.0.1

安装

  • 在您的 User 模型中扩展 UserModel

    use Joshwhatk\Cent\UserModel;
    
    class User extends UserModel
    {
        ...
    
  • 在您的 config/app.php 中注册 CentServiceProvider

    Joshwhatk\Cent\CentServiceProvider::class,
    
  • 在您的 config/auth.php 中将 API 驱动器更改为 cent

    'guards' => [
        'api' => [
            'driver' => 'cent',
            'provider' => 'users',
        ],
    ],