- What is developer-kareem-elsharkawy/nova-permission used for?
- It is a Laravel Nova tool that provides an admin interface for Spatie's laravel-permission package. You can use it to manage roles and permissions and assign roles to users without leaving the Nova panel. It sits on top of spatie/laravel-permission, so the underlying permission data remains compatible with Spatie's APIs.
- How do I install nova-permission in a Laravel Nova application?
- Install it with Composer using the package name developer-kareem-elsharkawy/nova-permission. You will also need Laravel Nova and spatie/laravel-permission installed and configured in the same application. After installing, register the tool in your Nova service provider as described in the package README, then run any required migrations or publish commands.
- Does this package require spatie/laravel-permission?
- Yes. The package is a Nova UI layer for Spatie's laravel-permission library, so Spatie's package must be installed and its migrations must be run. Roles and permissions are stored and managed through Spatie's models and APIs. The Nova tool does not replace Spatie; it gives you a convenient interface for working with it.
- Which Laravel and Nova versions are supported?
- Version support depends on the package's composer.json constraints, so check that file and the repository releases before installing. Nova tools are tied to Nova major versions, and Spatie laravel-permission also has its own Laravel version requirements. Confirm compatibility for your exact Laravel, Nova, and PHP versions before upgrading.
- How do I register the Nova tool after installation?
- Nova tools are normally registered in the tools method of app/Nova/NovaServiceProvider.php. Add the tool class provided by nova-permission to that array, following the exact class name and namespace shown in the package README. After registration, the tool should appear in the Nova sidebar for authorized users.
- Can I assign roles to users from the Nova interface?
- Yes, the tool is designed to let you manage role assignments from Nova. You can work with roles and permission sets and attach roles to users or resources according to Spatie's permission model. Exact assignment screens and behavior should be verified against the package README for your installed version.
- Do I need to run migrations for nova-permission?
- You must have Spatie laravel-permission's tables migrated before using the tool. If the package includes its own migrations or publishable assets, run those commands as documented in the README. Always back up your database and test migrations in a staging environment first.
- Is nova-permission safe to use in production?
- It can be used in production when access to the Nova tool is restricted to trusted administrators. Review the tool's authorization behavior, ensure only appropriate Nova users can see it, and test role and permission changes in staging first. Because it modifies access-control data, treat it as a sensitive admin feature.
- How is this different from creating custom Nova resources for roles and permissions?
- Instead of building your own Nova resources and forms for Spatie roles and permissions, this package provides a ready-made tool interface. That can reduce development time and give you standard screens for common role and permission tasks. Custom Nova resources may still be preferable if you need highly specialized workflows or field layouts.
- How do I check whether nova-permission is actively maintained?
- Review the GitHub repository for recent commits, releases, open issues, and compatibility notes with current Nova versions. Also check the composer.json constraints and Packagist release history before adopting it. If maintenance appears stale, consider building custom Nova resources around Spatie or evaluating an alternative Nova permission tool.