Giter VIP home page Giter VIP logo

laravel-single-session's Introduction

Laravel-single-session

A plugin provide single session authentication for Laravel 5.

Installing

$ composer require overtrue/laravel-single-session -vvv

Usage

  1. Register provider(if you disabled Laravel auto discovery)
    'providers' => [
        Overtrue\LaravelSingleSession\SingleSessionServiceProvider::class
    ],
  1. (Optional) Config the session:
    // config/session.php
    // The storage for store the last session id.
    'last_session_storage' => 'cache', // cache(default)/database
    
    // The field name of last session id.
    'last_session_field' => 'last_session_id', 
    
    // The path of redirect when logout after session changed.
    'redirect_path' => '/',
  1. it works.

Events

If the session changed, the following event will be triggered:

Overtrue\LaravelSingleSession\Events\SessionExpired

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT

laravel-single-session's People

Contributors

dependabot-preview[bot] avatar overtrue avatar summerblue avatar supermanphp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-single-session's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.