- What is wesselperik/nova-status-field used for?
- It is a Laravel Nova field for displaying a model attribute as a status label or badge in Nova index and detail views. You define custom status labels, icons, and colors, then add StatusField::make('Status') to a Nova resource. It replaces one-off badge code with a config-driven presentation field.
- How do I install wesselperik/nova-status-field in Laravel Nova?
- Install it with Composer using composer require wesselperik/nova-status-field. Then add the StatusField to the fields() method of an existing Nova resource. The package context does not indicate any migrations, queue setup, storage, or meaningful service provider configuration.
- How do I configure custom status labels and colors with StatusField?
- Use labels() and colors() on the field, and icons() if you want per-status icons. As of 3.1.0 you can optionally call background() and textColor() using a single value or per-icon mapping. Colors can be Tailwind tokens or raw color values.
- Which Laravel Nova and PHP versions does nova-status-field 3.1.0 support?
- The provided context does not state exact Nova major or PHP version constraints for 3.1.0. It notes that 3.1.0 tightened return types in StatusField.php, which may raise the PHP floor. Check the package composer.json and test against your Nova and PHP versions before upgrading.
- What happens if a status value has no matching label or color?
- The context flags unmapped status values as a key compatibility question rather than a documented guarantee. An unmapped value may show a default badge, render blank, or throw an exception. Test unmapped values in your Nova resources before relying on the field in production.
- Is nova-status-field backward compatible from 3.0.x to 3.1.0?
- For consumers using the field as published, the 3.1.0 changes are described as additive and configuration-level. Existing badges should render unchanged when background() and textColor() are never called, though this should be verified. The return-type tightening can break local subclasses, decorators, or test doubles at signature level.
- Why do my Nova status badge colors disappear after a Tailwind build?
- The field can use Tailwind token colors, and those classes silently no-op if they are purged from the compiled admin stylesheet. Re-check rendered badges after any Tailwind content-path or safelist change. Use raw colors or ensure the token classes survive the build.
- How should I test and upgrade nova-status-field safely in CI?
- Update the Composer constraint, run composer update, and run your test suite. Grep for subclasses, overrides, and mocks of StatusField, then fix signatures against the tightened return types. Also re-verify rendered badges after Tailwind changes because token-based colors depend on classes surviving the build.
- What are alternatives to nova-status-field, and can I use it outside Nova?
- It is a hard no outside Laravel Nova because the package is a Nova field that lives in the admin panel presentation layer. Alternatives include hand-rolled Blade partials, bespoke Vue fields, or your admin stack's own badge component. If you have standardized on Filament or custom admin screens, this package delivers nothing and should be rejected at intake.
- Is nova-status-field actively maintained and safe for production?
- The context shows low adoption: around 30 stars, zero dependents, a single maintainer, and a future-dated last release of 2026-07-06, so some metadata is untrustworthy. Risks are described as support-ticket-class rather than outage-class if you pin the version and keep the field off customer-facing surfaces. Confirm the maintainer's support window and whether forking is acceptable to your organization.