noking50/user

There is no license information available for the latest version (1.0.1) of this package.

Manage User Data in Session、Cookie、Cache

1.0.1 2018-06-20 05:05 UTC

This package is not auto-updated.

Last update: 2025-03-30 08:40:11 UTC


README

Access User data in Session、Cookie、Cache

Installing

install

composer required noking50/user

config

'group' => [
    // frontend user
    'member' => [
        'login' => 'Put Route name of login',
        'logout' => 'Put Route name of login',
    ],

    // backend user
    'admin' => [
        'login' => 'Put Route name of login',
        'logout' => 'Put Route name of login',
        'super' => [... Super admin User data save in session  ...],
    ],

    ... Other group ...
],

Usage

get User current group

User::group()

switch User group

User::group($group)

check user is login

User::group()

get user session data

User::get($key)

set user session data

User::set($key, $value)

delete user session data

User::forget($key)