Download the PHP package timedoor/laravel-role-js without Composer
On this page you can find all versions of the php package timedoor/laravel-role-js. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download timedoor/laravel-role-js
More information about timedoor/laravel-role-js
Files in timedoor/laravel-role-js
Package laravel-role-js
Short Description Import role & permission in Laravel into Javascript.
License MIT
Homepage https://github.com/backend-timedoor/laravel-role-js
Informations about the package laravel-role-js
Import role & permission in Laravel into Javascript.
Import roles & permissions data from Laravel into Javascript.
Installation
You can install the package via composer:
Don't forget to install jeremykenedy/laravel-roles package to use default setting.
You can publish the config file with:
This is the contents of the published config file:
Initialization
First, publish the JavaScript files that contain logic for roles and permissions. The files will publish to resources/js/roles
path.
if you want to change the publish path, spesify the path in the command.
Second, run the command to generate the JavaScript file contains roles & permissions data. It will generate file data.ts
in the publish path.
You can also spesify the publish path in the command.
Usage
You can use the generated file in your JavaScript code.
Custom Generator
You can create your own generator by implementing timedoor\RoleJs\Generator\GeneratorInterface
interface.
Then, change the generator class in the config file.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-role-js with dependencies
spatie/laravel-package-tools Version ^1.12.1
illuminate/contracts Version ^8.0 || ^9.0 || ^10.0