- What does norman-huth/nova-single-resource do?
- It is a thin Laravel Nova extension that reframes a Nova resource as a singleton, so users manage exactly one logical record instead of an indexable list. It hides the index and create views and routes users to the single edit form. Typical use cases are a settings table, global site configuration, profiles, or a homepage payload. It only touches the admin/presentation layer and does not alter your domain models, persistence, or APIs.
- How do I install nova-single-resource in a Laravel Nova application?
- Installation is a normal Composer require, followed by service-provider auto-discovery. You then extend the provided resource base class for your singleton model and register the resource in your NovaServiceProvider as usual. Because the package is archived and unmaintained, audit the source before installing and pin the exact version if you proceed. Validate the Composer constraints against your installed Nova version first.
- Which Laravel Nova versions does nova-single-resource support?
- It targets Laravel Nova 3.x and 4.x. The last release was 2022-12-08, which predates Nova 5, so Nova 5 estates are out of scope. Always check the package's composer.json constraints against your exact Nova, Laravel, and PHP versions before spiking.
- How do I create a settings resource with Nova single resource?
- You back the resource with a key-value style table, extend the package's single-resource base class, and register it in NovaServiceProvider. Nova then redirects to the edit form rather than showing an index or create button. Add a database unique constraint so the singleton invariant is enforced at the storage layer, not just in the UI.
- Does nova-single-resource work with Nova 5, Laravel 11, or PHP 8.3?
- There is no evidence it does. The repository is archived, the last release was in December 2022, and no compatibility patches exist for Nova 5, Laravel 11/12, or PHP 8.3/8.4. Compiled JavaScript assets for Nova fields are the most brittle surface, since Nova changed its asset pipeline across majors. Treat any newer-stack usage as an unsupported fork you own yourself.
- Is nova-single-resource still maintained?
- No. The repository is archived with no maintainer, roughly 5 stars, and zero dependents, so there is no issue triage, security fixing, or compatibility patching. The MIT license permits forking, which is the only realistic mitigation. If you adopt it, name an internal owner and define an exit criterion up front.
- How do I prevent duplicate records in a singleton resource?
- Add a database-level unique constraint on whatever column defines the singleton, such as a key column or a fixed identifier. Singleton logic that misbehaves can otherwise create duplicate rows where the domain expects exactly one. A guard in the resource layer is useful UX, but the constraint is mandatory regardless of whether you use this package or your own implementation.
- What are the alternatives to nova-single-resource?
- The most practical alternative is reimplementing the pattern in-house: read the source, override the index and routing behavior to redirect to the edit form, guard against record creation, and port the field components only if you actually need them. That is estimated at one to two engineering days and gives you full ownership and upgradeability. You can also vendor or fork the code into a local path repository under your namespace and pin the commit.
- Should I depend on nova-single-resource in production?
- Installing it as a normal remote Packagist dependency is not recommended given the archived state and zero ecosystem signal. The preferred path is treating the repository as a reference implementation and rebuilding the small singleton behavior internally. If you must adopt it, vendor or fork it, pin the exact version, and add integration tests around the singleton contract.
- How do I test a Nova single resource before adopting the package?
- Run a timeboxed spike on a branch using the exact PHP, Laravel, and Nova versions from production. Build one real singleton resource end to end, and explicitly exercise the asset pipeline, including field component rendering and any publish tags, since that is where 2022-era packages fail first. Add contract and integration tests around the single-record guarantee before deciding between forking and reimplementing.