$ composer require acr/roles
$ php artisan vendor:publish --provider="acr\roles\rolesServiceProvider"
$ php artisan make:auth
$ php artisan migrate
$ php artisan make:model Role
acr\roles\rolesServiceProvider::class,
function roles() {
return $this->belongsToMany('App\Role');
}
$acrRolesFilesPathJs = "/vendor/acr/roles/static/js";
$acrRolesFilesPathCss = "/vendor/acr/roles/static/css";
$scannedDirectoryJs = array_diff(scandir($acrRolesFilesPathJs), array('..', '.'));
$scannedDirectoryCss = array_diff(scandir($acrRolesFilesPathCss), array('..', '.'));
<html>
<head>
<!-- push target to head -->
@stack('styles')
@stack('scripts')
</head>
<body>
<!-- or push target to footer -->
@stack('scripts')
</body>
</html>
@push('styles')
@foreach($scannedDirectoryCss as $file)
<link href="{{"/$file"}}" rel="stylesheet">
@endforeach
@endpush
@push('scripts')
@foreach($scannedDirectoryJs as $file)
<script type="text/javascript" src="{{ "/$file" }}"></script>
@endforeach
@endpush
#/acr/roles/user/{{$user_id}}
#/acr/roles/new
$ composer test
If you discover any security related issues, please email author email instead of using the issue tracker.
license. Please see the license file for more information.