rudra/auth

Rudra 框架

v2.0.0 2018-05-29 14:28 UTC

This package is auto-updated.

Last update: 2024-09-25 15:42:19 UTC


README

PHPunit Scrutinizer Code Quality Code Climate CodeFactor GitHub

Rudra-Auth | API

授权

安装 / 安装

composer require rudra/auth

设置角色 / 角色配置
[
    'admin'     => 0,
    'editor'    => 1,
    'moderator' => 2,
    'user'      => 3
]

使用 / 使用方法

use Rudra\Auth\AuthFacade as Auth;

$user = [
    "email"    => "user@email.com",
    "password" => "password"
];

Auth::authentication($user[0], $user[1], "admin/dashboard", "Укажите верные данные");
Auth::exitAuthenticationSession();
Auth::restoreSessionIfSetRememberMe("login");