PHPackages                             acr/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. acr/roles

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

acr/roles
=========

:description

010[22 PRs](https://github.com/rdtvaacar/roles/pulls)CSS

Since May 30Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (23)Used By (0)

roles
=====

[](#roles)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1af6c15f7f20b07a3cb1d1b192168fd39fb450ed354f1109e3d38842dcdd6be7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7264747661616361722f726f6c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rdtvaacar/roles)[![Total Downloads](https://camo.githubusercontent.com/8dfc43be1faf6b3966cc624b63ef9cef09da83f5a5e127c8f1d0cebc6180c829/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7264747661616361722f726f6c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rdtvaacar/roles)[![Build Status](https://camo.githubusercontent.com/16c3e66155ed1ba878416e5808a1288f7eea4cd9c8e0b16dff565f8d6f93b85e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7264747661616361722f726f6c65732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/rdtvaacar/roles)

Installation
------------

[](#installation)

#### Via Composer

[](#via-composer)

```
$ composer require acr/roles
```

##### Php Artisan

[](#php-artisan)

```
$ php artisan vendor:publish --provider="acr\roles\rolesServiceProvider"
```

```
$ php artisan make:auth
```

```
$ php artisan migrate
```

```
$ php artisan make:model Role
```

##### add config/app.php

[](#add-configappphp)

```
acr\roles\rolesServiceProvider::class,
```

##### Insert Models User.php

[](#insert-models-userphp)

```
function roles() {
   return $this->belongsToMany('App\Role');
}
```

##### controller.php

[](#controllerphp)

```
$acrRolesFilesPathJs = "/vendor/acr/roles/static/js";
$acrRolesFilesPathCss = "/vendor/acr/roles/static/css";
$scannedDirectoryJs = array_diff(scandir($acrRolesFilesPathJs), array('..', '.'));
$scannedDirectoryCss = array_diff(scandir($acrRolesFilesPathCss), array('..', '.'));
```

##### layout.blade.php

[](#layoutbladephp)

```

        @stack('styles')
        @stack('scripts')

        @stack('scripts')

```

##### view.blade.php

[](#viewbladephp)

```
@push('styles')
   @foreach($scannedDirectoryCss as $file)

   @endforeach
@endpush
@push('scripts')
    @foreach($scannedDirectoryJs as $file)

    @endforeach
@endpush
```

Usage
-----

[](#usage)

#### Your link of user page and add roles

[](#your-link-of-user-page-and-add-roles)

```
 #/acr/roles/user/{{$user_id}}
 #/acr/roles/new
```

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [author name](https://github.com/rdtvaacar)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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/286fe1af829a5e5b5420cc161756595145eec530dce86314a57dbb883d44f5cc?d=identicon)[rdtvaacar](/maintainers/rdtvaacar)

---

Top Contributors

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

---

Tags

laravelpackagephpreactjsroles-management

### Embed Badge

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

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

###  Alternatives

[balping/ticketit-app

Ticketit, the simple helpdesk tickets system pre-installed in Laravel

136.6k](/packages/balping-ticketit-app)

PHPackages © 2026

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