PHPackages                             overtrue/laravel-single-session - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. overtrue/laravel-single-session

AbandonedArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

overtrue/laravel-single-session
===============================

A plugin provide single session authentication for Laravel 5.

1.0.0(8y ago)187003[1 issues](https://github.com/overtrue/laravel-single-session/issues)MITPHP

Since Dec 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/overtrue/laravel-single-session)[ Packagist](https://packagist.org/packages/overtrue/laravel-single-session)[ RSS](/packages/overtrue-laravel-single-session/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel-single-session
======================

[](#laravel-single-session)

A plugin provide single session authentication for Laravel 5.

Installing
----------

[](#installing)

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

Usage
-----

[](#usage)

1. Register provider(if you disabled Laravel auto discovery)

```
    'providers' => [
        Overtrue\LaravelSingleSession\SingleSessionServiceProvider::class
    ],
```

2. (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' => '/',
```

3. it works.

### Events

[](#events)

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

```
Overtrue\LaravelSingleSession\Events\SessionExpired

```

PHP 扩展包开发
---------

[](#php-扩展包开发)

> 想知道如何从零开始构建 PHP 扩展包？
>
> 请关注我的实战课程，我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package)

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c507e57eab402e81335012357b7d7df6c5cafda3073adcc94b475037127d263f?d=identicon)[overtrue](/maintainers/overtrue)

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![summerblue](https://avatars.githubusercontent.com/u/324764?v=4)](https://github.com/summerblue "summerblue (1 commits)")[![SuperManPHP](https://avatars.githubusercontent.com/u/46402212?v=4)](https://github.com/SuperManPHP "SuperManPHP (1 commits)")

---

Tags

laravellaravel-sessionsingle-session

### Embed Badge

![Health badge](/badges/overtrue-laravel-single-session/health.svg)

```
[![Health](https://phpackages.com/badges/overtrue-laravel-single-session/health.svg)](https://phpackages.com/packages/overtrue-laravel-single-session)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
