PHPackages                             killallskywalker/tnbr-middleware - 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. killallskywalker/tnbr-middleware

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

killallskywalker/tnbr-middleware
================================

Handle authorization and middleware for tnbr auth session

v1.0.3(2y ago)0315MITPHPPHP ^7.4|^8.0

Since May 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/killallskywalker/tnbr-middleware)[ Packagist](https://packagist.org/packages/killallskywalker/tnbr-middleware)[ RSS](/packages/killallskywalker-tnbr-middleware/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Role And Permission Checker
===========================

[](#role-and-permission-checker)

Simple package to be use in our system to handle role and permission without adding custom code in every project .

Features
--------

[](#features)

- Admin Permission Role Route Middleware
- Has Role And Permission Trait

Usage/Examples
--------------

[](#usageexamples)

Route Middleware

```
# for single role or permission
Route::get('/service-list', ServiceList::class)->middleware('admin-role-permission:admin')

# for multiple role or permission
Route::get('/service-list', ServiceList::class)->middleware('admin-role-permission:admin|editor|can-edit|can-delete')

```

Trait

```
# use the trait in user model or any model that use as guard provider

use Killallskywalker\TnbrMiddleware\Traits\HasRoleAndPermission;

class User {
    use HasRoleAndPermission;
}

# for single role to use it with auth you just can
auth()->user()->hasRole('singleRole');

# for multiple role to use it with auth you just can
auth()->user()->hasAnyRole(['roleA','roleB']);

# for permission you can use like this
auth()->user()->hasPermission('permissionA');

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Every ~114 days

Total

4

Last Release

754d ago

PHP version history (2 changes)v1.0.0PHP ^7.4

v1.0.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/18b3e3d82c26619b70d56ee85fea993d381cc42b2b36b3359589af988d21928d?d=identicon)[killallskywalker](/maintainers/killallskywalker)

### Embed Badge

![Health badge](/badges/killallskywalker-tnbr-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/killallskywalker-tnbr-middleware/health.svg)](https://phpackages.com/packages/killallskywalker-tnbr-middleware)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M42](/packages/santigarcor-laratrust)[overtrue/laravel-follow

User follow unfollow system for Laravel.

1.2k404.7k5](/packages/overtrue-laravel-follow)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)

PHPackages © 2026

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