New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

acr/roles

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acr/roles

:description

Source
Packagist
Version
dev-dependabot/npm_and_yarn/src/views/js/roles/json5-and-json5-2.2.3
Version published
Total downloads
10
Maintainers
1
Created
Source

roles

Latest Version on Packagist Total Downloads Build Status

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

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

  • author name

License

license. Please see the license file for more information.

Keywords

laravel

FAQs

Package last updated on 03 Jan 2023

Related posts