PHPackages                             dluwang/auth - 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. dluwang/auth

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

dluwang/auth
============

Laravel extended auth mechanism

v2.0.0(6y ago)010[3 PRs](https://github.com/dluwang/auth/pulls)MIT

Since May 11Compare

[ Source](https://github.com/dluwang/auth)[ Packagist](https://packagist.org/packages/dluwang/auth)[ RSS](/packages/dluwang-auth/feed)WikiDiscussions Synced 2d ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

Auth
====

[](#auth)

[![Build Status](https://camo.githubusercontent.com/4a9448a21519c99d43bdb7d62e356119dd1d348bd9f9a1b4450c3533fa89543e/68747470733a2f2f7472617669732d63692e6f72672f646c7577616e672f617574682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dluwang/auth)[![Latest Stable Version](https://camo.githubusercontent.com/ae5dc7d7fc7e69e6bd7644834f6290e8c36fdb470b5958e24875baae04c7ab7d/68747470733a2f2f706f7365722e707567782e6f72672f646c7577616e672f617574682f762f737461626c65)](https://packagist.org/packages/dluwang/auth)[![License](https://camo.githubusercontent.com/02ddefbbba8a357dc22e12c4f590682d19692541cd2aa96d850cb86722b62c59/68747470733a2f2f706f7365722e707567782e6f72672f646c7577616e672f617574682f6c6963656e7365)](https://packagist.org/packages/dluwang/auth)

Laravel extended auth mechanism. This package is intended to provide dynamic, database-driven authorization mechanism. Gates and Policies will be registered to database, mapped with respective roles and users.

### Installation

[](#installation)

```
composer require dluwang/auth

```

Run `php artisan dluwang-auth:install` to generate all necessary files. This command will generate migration files, Role, and Permission class. You can edit the files before running migrate command to match your requirement. Add provided `Dluwang\Auth\Concerns\Assignable` trait to your assignable class (it's your user class for most cases).

```
use Dluwang\Auth\Concerns\Assignable;

class User extends Authenticatable
{
    use Assignable;
}
```

### Usage

[](#usage)

To check if user has permissions you can use `authorized` method. This method can take string or array argument.

```
$user->authorized('permissions');
$user->authorized(['permission-one', 'permission-two']);
```

To check if user has at least one given permissions, you can use `authorizedOneOf` method.

```
$user->authorizedOneOf(['permission-one', 'permission-two']);
```

You can also seamlessly integrate this package with Laravel's built in authorization feature. This package can collect registered gates and policies by running

```
php artisan dluwang-auth:collect-permissions

```

#### **Note**

[](#note)

Laravel versionPackage version5.8.\*^1.0^6.0^2.0### Configuration

[](#configuration)

This package provide configuration to customize your needs. You can publish the configuration by running command below.

```
php artisan vendor:publish

```

### Test

[](#test)

This repository provide docker-compose file to create isolated environment. To perform test you can use run

```
vendor/bin/phpunit

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity64

Established project with proven stability

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 ~162 days

Total

2

Last Release

2444d ago

Major Versions

v1.0.0 → v2.0.02019-10-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/86155a9709a56bf2ff58e7424d9ac9a1787aa8ae3612744771a393fa2bfb5668?d=identicon)[inologi](/maintainers/inologi)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dluwang-auth/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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