- What does mateusjatenee/nova-permission do?
- It is a Laravel Nova tool that provides a dedicated interface for managing roles and permissions from Spatie's laravel-permission package. You can create roles, attach permissions to them, and assign roles to users inside Nova without writing custom admin code or one-off migrations. It sits on top of laravel-permission, so that package remains the source of truth for authorization checks in your application.
- How do I install nova-permission in a Laravel Nova application?
- Install it with Composer alongside Laravel Nova and Spatie's laravel-permission, then register the tool in your NovaServiceProvider's tools method. Because v4.0.0 targets PHP 8.1+ and laravel-permission v5, confirm those constraints before running composer require. Review the repository README for the exact tool registration snippet and any publishable assets.
- Does nova-permission v4 support PHP 8.1 and laravel-permission v5?
- Yes, v4.0.0 aligns the package with PHP 8.1+ and laravel-permission v5 according to the release notes. Applications still on PHP 8.0 or laravel-permission v4 should expect dependency resolution or runtime incompatibilities. Verify the Composer constraints in composer.json before upgrading production services.
- Which Laravel versions does nova-permission support?
- Laravel version support is driven by the Nova version you run and the package's Composer constraints, so check composer.json and the release notes before upgrading. Because Nova is a commercial package with its own version requirements, match nova-permission to a Nova release you have already validated. Do not assume Laravel support from the package description alone.
- How do I assign roles to users from Nova using this tool?
- Once the tool is registered, it adds a Nova interface where you can select a user and attach or detach roles managed by laravel-permission. Role-to-permission relationships are editable from the same tool, so you do not need to write custom Nova resources. Changes take effect through laravel-permission's normal authorization flow, so clear any permission cache if your app uses one.
- Are there breaking changes when upgrading nova-permission from v3 to v4?
- The v4.0.0 release notes are sparse and mainly state alignment with PHP 8.1+ and laravel-permission v5. That implies breaking changes are possible in public APIs, config, migrations, or permission model behavior, but they are not enumerated. Review the changelog and upgrade guide, and test authorization flows in staging before deploying to production.
- Do I need to publish migrations or configuration files for nova-permission?
- The package builds on laravel-permission, so your application still needs the laravel-permission migrations and config published and migrated. Any package-specific config or assets should be published per the README instructions. Validate the published files against your database driver and cache store during the upgrade.
- How can I test roles and permissions created through the Nova tool?
- Cover the tool with feature tests that act as an authorized Nova user, create a role, attach permissions, and assign it to a user. Then assert application authorization checks using laravel-permission's Gate or hasPermissionTo methods. Include a test for cache behavior if you use laravel-permission's permission cache, since stale caches are a common failure mode.
- What are alternatives to nova-permission for managing roles in Laravel Nova?
- You can manage roles with a custom Nova resource built directly on laravel-permission models, though that requires more code and maintenance. Other community Nova tools exist for role and permission management, so compare maintenance activity and laravel-permission version support. If you only need occasional edits, an artisan command or seeded config may be simpler than a Nova tool.
- Is nova-permission maintained and safe to use in production?
- It is a community package, so assess maintainer responsiveness, issue tracker activity, and security disclosure practices before relying on it. The v4.0.0 release moves it onto a supported PHP and laravel-permission baseline, which reduces long-term drift for modern stacks. Keep a rollback plan to your prior package and dependency versions, and pin versions deliberately.