Giter Site home page Giter Site logo

roles's Introduction

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

License

license. Please see the license file for more information.

roles's People

Contributors

rdtvaacar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.