PHPackages                             gsdw/permission - 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. gsdw/permission

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

gsdw/permission
===============

Laravel permission plus

00[1 issues](https://github.com/gsdw/permission/issues)PHP

Since May 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/gsdw/permission)[ Packagist](https://packagist.org/packages/gsdw/permission)[ RSS](/packages/gsdw-permission/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Gsdw Premission
=======================

[](#laravel-gsdw-premission)

Introduction
------------

[](#introduction)

### Install

[](#install)

add code to composer.json

```
"require": {
    "gsdw/permission": "0.1.*"
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/gsdw/permission"
    }
],

```

### Setup

[](#setup)

#### Add providers

[](#add-providers)

add providers in config/app.php

```
Gsdw\Permission\Providers\PermissionServiceProvider::class,

```

#### Change User model

[](#change-user-model)

Change User model called to `Gsdw\Permission\Models\User`

- in file `config/auth.php`:

    'providers' =&gt; \[ 'users' =&gt; \[ 'driver' =&gt; 'eloquent', 'model' =&gt; Gsdw\\Permission\\Models\\User::class \], \]
- in file `app\Http\Controllers\Auth\AuthController.php`

#### Create table

[](#create-table)

Use this code in migration:

```
$migrate = new \Gsdw\Permission\Database\Migrate();
$migrate->up();

```

#### Router collection name

[](#router-collection-name)

Create file `config/routeas.php`, add date for route alias:

```
return [
    'route.alias.name' => 'route custom name',
]

```

#### view

[](#view)

- Layout default: layouts.default
- add `@yield('scriptCode')` at before body end tag
- copy all file in public to root\_folder/public

#### Code

[](#code)

- route has name prefix is `auth.` to check validate permission
- use `class Gsdw\Permission\Helpers\Auth`

- validate Authorize: Auth::getSelf()-&gt;validateRule();
- get Scope current for route: Auth::getSelf()-&gt;getScopeCurrent();
- checking is scope self: Auth::getSelf()-&gt;isScopeSelf();
- checking is scope team: Auth::getSelf()-&gt;isScopeTeam();
- checking is scope company: Auth::getSelf()-&gt;isScopeCompany();

##### Logout function

[](#logout-function)

Flush session when logout \\Gsdw\\Permission\\Helpers\\Auth::getSelf()-&gt;flushPermission();

```
public function logout() {
    Auth::guard($this->getGuard())->logout();
    \Gsdw\Permission\Helpers\Auth::getSelf()->flushPermission();
    return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
}

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

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/ac5d262c7a77434bf5f5113488a70c30fcc6ca87d3bb979e94a630c73a884fda?d=identicon)[giangsoda](/maintainers/giangsoda)

---

Top Contributors

[![giangsoda](https://avatars.githubusercontent.com/u/6734235?v=4)](https://github.com/giangsoda "giangsoda (2 commits)")

### Embed Badge

![Health badge](/badges/gsdw-permission/health.svg)

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

###  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)
