PHPackages                             gennadiy-bilyk/roles - 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. gennadiy-bilyk/roles

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

gennadiy-bilyk/roles
====================

roles sleeping owl admin

019PHP

Since Apr 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/GennadiyBilyk/gb-roles)[ Packagist](https://packagist.org/packages/gennadiy-bilyk/roles)[ RSS](/packages/gennadiy-bilyk-roles/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#installation

*Пакет требует установленных пакетов*"laravelrus/sleepingowl": "4.\*@dev",

\*\*также необходимо выполнить команду php artisan make:auth перед установкой

```
 #Установка пакета
 	 Добавляем в composer.json require секция "gennadiy-bilyk/roles":"*@dev"
 	 composer update

      Добавляем сервис провайдеры в config/app
 	       GennadiyBilyk\Roles\RolesProvider::class,

 	 Выполняем

 	  php artisan vendor:publish --provider="GennadiyBilyk\Roles\RolesProvider" --force

 	  Заюзаем трэйт  App\Models\Permission\HasRoles в модель User

 	  Добавим в модель User методы
 	    /**
           * @return bool
           */
          public function isSuperAdmin()
          {
              return $this->hasRole('admin');
          }

 	  Добавим вызов сидера в database/DatabaseSeeder.php
 	  $this->call(PermissionsRolesSeeder::class);

 	  Выполним
 	  php artisan migrate
 	  php artisan db:seed --class=PermissionsRolesSeeder

 	  В файл app\Http\Kernel.php в свойство $routeMiddleware добавим
 	  'admin' => \App\Http\Middleware\AdminAuthenticate::class,

 	  В файле конфигурации админки config\sleeping_owl.php
 	  поменяем middleware на
 	  'middleware' => ['web','admin'],

 	  Добавляем модель в app\Providers\AdminSectionsServiceProvider.php свойство $sections
 	    \App\User::class => 'App\Http\Sections\Users',
         \App\Models\Permission\Role::class=>'App\Http\Sections\Roles',

 	  Добавим в меню админки
 	         [
                       'title' => 'Permissions',
                       'icon' => 'fa fa-exclamation',
                       'priority' =>'10000',
                       'pages' => [

                           (new Page(\App\Models\Permission\Role::class))
                               ->setPriority(100),
                           (new Page(\App\User::class))
                               ->setPriority(100)
                       ]
                   ]

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

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://avatars.githubusercontent.com/u/3899898?v=4)[Gennadiy](/maintainers/GennadiyBilyk)[@GennadiyBilyk](https://github.com/GennadiyBilyk)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gennadiy-bilyk-roles/health.svg)

```
[![Health](https://phpackages.com/badges/gennadiy-bilyk-roles/health.svg)](https://phpackages.com/packages/gennadiy-bilyk-roles)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

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

PHPackages © 2026

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