- What is ninjaportal/filament-shield used for in Laravel?
- It is a Filament plugin for role and permission management in Laravel admin panels. It is forked from Filament Shield and builds on spatie/laravel-permission to provide a permissions UI and automatic policy generation. You use it to secure Filament resources, pages, and widgets with fine-grained access control.
- How is ninjaportal/filament-shield different from Filament Shield?
- It is a fork of Filament Shield, so it shares the same core purpose of role and permission management for Filament panels. A fork can differ in maintenance, fixes, or custom changes made by the fork owner. Check the repository README and release history to confirm the specific differences before choosing it over the original.
- Does ninjaportal/filament-shield require spatie/laravel-permission?
- Yes, the package is built on spatie/laravel-permission for storing and managing roles and permissions. That means your Laravel app will use the Spatie permission tables and conventions. You should review the Spatie package requirements and migrations as part of setup.
- How do I install ninjaportal/filament-shield in a Laravel Filament app?
- Install it with Composer using the package name ninjaportal/filament-shield, then follow the repository setup instructions for migrations, publishing, and plugin registration. Because it is a Filament plugin, you will typically register it in your Filament panel provider. Always use the README for the exact installation steps for your Filament version.
- Does it automatically generate policies for Filament resources?
- Yes, the package generates policies automatically as part of its role and permission workflow. This helps enforce access control without writing every policy by hand. You should still review generated policies and adjust them for custom authorization rules.
- Can I manage permissions for Filament resources, pages, and widgets?
- Yes, the package is designed to secure Filament resources, pages, and widgets. It provides a permissions UI so you can assign fine-grained access through roles and permissions. This makes it useful for admin panels where different users need different levels of access.
- Which Laravel and Filament versions are supported by ninjaportal/filament-shield?
- The package is intended for Laravel applications that use Filament, but exact supported versions depend on the fork's composer constraints. Check the repository composer.json and README for the Laravel and Filament版本 requirements. Confirm compatibility before installing it in an existing project.
- How are roles and permissions stored when using this package?
- Roles and permissions are stored through spatie/laravel-permission, which uses database tables for roles, permissions, and their relationships. The package provides the Filament UI and policy generation on top of that foundation. You need to run the required migrations and configure Spatie as usual.
- Is ninjaportal/filament-shield suitable for production admin panels?
- It can be used in production when roles and permissions are configured carefully and the package is compatible with your Laravel and Filament versions. Review the repository documentation, test authorization flows, and follow Spatie permission caching guidance. Because it is a fork, also check release activity and maintenance status before relying on it long term.
- Should I use this fork or the original Filament Shield package?
- Choose based on the specific changes, maintenance activity, and compatibility notes in the ninjaportal/filament-shield repository. If you need the fork owner's fixes or customizations, compare them with the original Filament Shield releases. For most teams, the safest choice is the package that best matches your Filament version and has clear ongoing maintenance.