How to overwrite package functionality
mainTo modify the behavior of the PermissionManager, follow these patterns:
- Routes: Create
routes/backpack/permissionmanager.phpto override package routes. - Controllers/Models: Create classes that
extendthe package's base classes. Use these new classes in your custom routes file. - User Model: When creating custom controllers or seeders, always use the User model defined in your Backpack configuration rather than a hardcoded
App\Userclass. This ensures compatibility with your specific setup.
Use config('backpack.base.user_model_fqn') to get the correct fully qualified namespace for the User model.