Download the PHP package luilliarcec/filament-shield without Composer
On this page you can find all versions of the php package luilliarcec/filament-shield. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luilliarcec/filament-shield
More information about luilliarcec/filament-shield
Files in luilliarcec/filament-shield
Package filament-shield
Short Description Filament support for `spatie/laravel-permission`.
License MIT
Homepage https://github.com/luilliarcec/filament-shield
Informations about the package filament-shield
Filament Shield
The easiest and most intuitive way to add access management to your Filament Admin:
- :fire: Resources
- :fire: Pages
- :fire: Widgets
Fork from bezhanSalleh/filament-shield
Support Filament
Installation
Install the package via composer:
Publish the config file with:
Configure your options
Add the Spatie\Permission\Traits\HasRoles
trait to your User model(s):
If you want to generate your permissions, along with the policy, use the following command:
The package is smart enough to generate the policies in the same namespace as your model associated with the filament resource.
To make use of this package, each resource
, page
or widget
must implement the following contract.
Luilliarcec\FilamentShield\Contracts\HasPermissions
You must implement each of the methods or if you like you can use the traits for each case, resource
, page
or `
widget.
If you want to add or remove permissions to your resource for generation, you can override the permissions method.
Now this resource will only have two permissions.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
If you want to contribute to these packages, you may want to test it in a real Filament project:
- Fork this repository to your GitHub account.
- Create a Filament app locally.
- Clone your fork in your Filament app's root directory.
- In the
/filament-shield
directory, create a branch for your fix, e.g.fix/error-message
.
Install the packages in your app's composer.json
:
Credits
- Bezhan Salleh
- Luis Arce
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-shield with dependencies
filament/filament Version ^2.0
illuminate/contracts Version ^8.0|^9.0
spatie/laravel-package-tools Version ^1.9.2
spatie/laravel-permission Version ^5.0