acr / roles
:description
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 22
Language:CSS
Requires
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~7.0
- sempro/phpunit-pretty-print: ^1.0
- dev-master
- dev-dependabot/npm_and_yarn/src/views/js/roles/json5-and-json5-2.2.3
- dev-dependabot/npm_and_yarn/src/views/js/roles/express-4.18.2
- dev-dependabot/npm_and_yarn/src/views/js/roles/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/src/views/js/roles/css-what-2.1.3
- dev-dependabot/npm_and_yarn/src/views/js/roles/hapi/hoek-and-hapi/joi-8.5.1
- dev-dependabot/npm_and_yarn/src/views/js/roles/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/src/views/js/roles/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/src/views/js/roles/ajv-6.12.6
- dev-dependabot/npm_and_yarn/src/views/js/roles/tmpl-1.0.5
- dev-dependabot/npm_and_yarn/src/views/js/roles/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/src/views/js/roles/postcss-7.0.36
- dev-dependabot/npm_and_yarn/src/views/js/roles/merge-deep-3.0.3
- dev-dependabot/npm_and_yarn/src/views/js/roles/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/src/views/js/roles/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/src/views/js/roles/handlebars-4.7.7
- dev-dependabot/npm_and_yarn/src/views/js/roles/ssri-6.0.2
- dev-dependabot/npm_and_yarn/src/views/js/roles/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/src/views/js/roles/axios-0.21.1
- dev-dependabot/npm_and_yarn/src/views/js/roles/http-proxy-1.18.1
- dev-dependabot/npm_and_yarn/src/views/js/roles/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/src/views/js/roles/acorn-5.7.4
- dev-dependabot/npm_and_yarn/src/views/js/roles/eslint-utils-1.4.3
This package is auto-updated.
Last update: 2024-10-30 01:42:45 UTC
README
Installation
Via Composer
$ composer require acr/roles
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
acr\roles\rolesServiceProvider::class,
Insert Models User.php
function roles() { return $this->belongsToMany('App\Role'); }
controller.php
$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
<html> <head> <!-- push target to head --> @stack('styles') @stack('scripts') </head> <body> <!-- or push target to footer --> @stack('scripts') </body> </html>
view.blade.php
@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
Usage
Your link of user page and add roles
#/acr/roles/user/{{$user_id}} #/acr/roles/new
Testing
$ composer test
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
license. Please see the license file for more information.