PHPackages                             rowanfuchs/singlesession - 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. [Framework](/categories/framework)
4. /
5. rowanfuchs/singlesession

ActiveLibrary[Framework](/categories/framework)

rowanfuchs/singlesession
========================

Laravel single session middleware

v1.0.0(7y ago)028MITPHPPHP &gt;=7.0

Since Mar 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/rowanfuchs/Laravel-single-session-middleware)[ Packagist](https://packagist.org/packages/rowanfuchs/singlesession)[ RSS](/packages/rowanfuchs-singlesession/feed)WikiDiscussions master Synced 2d ago

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

Laravel single session middleware
---------------------------------

[](#laravel-single-session-middleware)

With this single session middleware Laravel will enforce a single session per user from any location. When a new session starts the old user will be logged out.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Maintainability](https://camo.githubusercontent.com/4a69c82c27cb8651dba132b1cd240b537468c8c092de7318c175848302130f4e/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f65323737306130666236653961633636313433662f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/rowanfuchs/Laravel-single-session-middleware/maintainability)

### Installation

[](#installation)

Install with composer:

```
composer require rowanfuchs/singlesession

```

Add the following line to your routeMiddleware in app\\Http\\Kernel.php

```
'singlesession' => \rowanfuchs\SingleSession\Middleware\SingleSession::class,
```

Then use the following line in the \_\_construct of your controller

```
$this->middleware('singlesession');
```

Or assign it via the route group

```
Route::group(['middleware' => ['singlesession']], function () {
    Route::get('/home', 'HomeController@index')->name('home');
});
```

License
-------

[](#license)

### MIT

[](#mit)

Copyright (c) 2018 Rowan Fuchs,

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

2661d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48676736?v=4)[Rowan](/maintainers/rowanfuchs)[@rowanfuchs](https://github.com/rowanfuchs)

---

Top Contributors

[![rowanfuchs](https://avatars.githubusercontent.com/u/48676736?v=4)](https://github.com/rowanfuchs "rowanfuchs (3 commits)")

### Embed Badge

![Health badge](/badges/rowanfuchs-singlesession/health.svg)

```
[![Health](https://phpackages.com/badges/rowanfuchs-singlesession/health.svg)](https://phpackages.com/packages/rowanfuchs-singlesession)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k24.7M207](/packages/laravel-octane)[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3911.7k](/packages/codewithdennis-larament)[r2luna/brain

Brain: A process-driven architecture alternative for your Laravel Application.

6333.0k1](/packages/r2luna-brain)

PHPackages © 2026

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