PHPackages                             yottaram/multi-login-restrictor - 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. yottaram/multi-login-restrictor

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

yottaram/multi-login-restrictor
===============================

63703PHP

Since Nov 16Pushed 11y agoCompare

[ Source](https://github.com/jonstavis/laravel-multi-login-restrictor)[ Packagist](https://packagist.org/packages/yottaram/multi-login-restrictor)[ RSS](/packages/yottaram-multi-login-restrictor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Multi-Login Restrictor
==============================

[](#laravel-multi-login-restrictor)

Restrict users on a Laravel 4 system from logging in more than a certain number of times.

This package provides a filter to add to your Laravel routes that will log out the oldest user session for a particular user when he or she is logged in more than a set number of times.

There is a current dev dependency on [Laravel 4 Generators](https://github.com/JeffreyWay/Laravel-4-Generators).

Usage
-----

[](#usage)

Add the composer definition to your composer.json:

```
"yottaram/multi-login-restrictor": "dev-master"
```

And run `composer update`. When it is installed, register the service provider in `app/config/app.php` in the `providers` array:

```
'providers' => array(
        'Yottaram\MultiLoginRestrictor\MultiLoginRestrictorServiceProvider',
)
```

Publish configuration and review settings in `app/config/packages/yottaram/multi-login-restrictor/config.php`:

```
php artisan config:publish yottaram/multi-login-restrictor

```

In particular, make sure the `users_table` property is set to the name of the users table in your application. You may also change the field on the users table that indicates how many simultaneous logins each user will be allowed. To do this edit `users_num_seats_field`.

Run the artisan command to generate migrations which will add a `num_seats` field to the users table and a `users_logins` table:

```
php artisan multi-login:make-migration

```

Run the migrations:

```
php artisan migrate

```

Add the `multi-login-restrict` filter to any route:

```
Route::group( [ 'before' => [ 'auth', 'multi-login-restrict' ] ], function()
```

Users by default will be allowed to login at most one simultaneous time. You may change the value of `num_seats` for any particular user to allow his account additional simultaneous logins.

If the maximum number of logins is exceeded for a user, the oldest user session that logged in will be logged out and Redirected to '/'.

TODO - configure the route a user is sent to when logged out.

TODO - if request is made via Ajax, then just send a 403 response.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![jonstavis](https://avatars.githubusercontent.com/u/1569236?v=4)](https://github.com/jonstavis "jonstavis (9 commits)")

### Embed Badge

![Health badge](/badges/yottaram-multi-login-restrictor/health.svg)

```
[![Health](https://phpackages.com/badges/yottaram-multi-login-restrictor/health.svg)](https://phpackages.com/packages/yottaram-multi-login-restrictor)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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