Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Nova Single Record Resource

Nova Single Record Resource Laravel Package

marko298/nova-single-record-resource

A Laravel Nova package for single-record resources, letting you build settings-style pages where only one record ever exists. It hides Nova's create and delete actions and skips index listings so users land directly on the edit form, keeping singleton configuration screens clean and simple.

View on GitHub
Deep Wiki
Context7

Shows a link in the navigation bar directly to the only record of the resource

Frequently asked questions about Nova Single Record Resource
What is marko298/nova-single-record-resource used for?
It is a Laravel Nova package for resources that should only ever contain one record. It adds a navigation link straight to that record and skips the index listing so users land on the edit form. It also hides Nova's create and delete actions to keep singleton screens clean.
How do I install marko298/nova-single-record-resource?
Install it with Composer using the package name marko298/nova-single-record-resource. Then follow the package README for registering the resource behavior in your Nova application. Because Laravel and Nova version constraints matter, check the Composer requirements before installing.
Which Laravel and Nova versions are supported?
This package is built for Laravel Nova, so your application must already use Nova. The exact Laravel and Nova version constraints are defined in the package's composer.json and README. Check those constraints before adding it to an existing project.
How do I configure a resource as single-record?
You configure the single-record behavior in your Nova resource class, while defining fields as you normally would for Nova. The package then handles the navigation link and hides index, create, and delete flows. Refer to the README for the exact class, trait, or method names to use.
What happens to Nova's create and delete actions?
The package hides Nova's create and delete actions for the resource. That prevents users from adding duplicate records or removing the singleton accidentally. You should still create or seed the single record so the edit form has something to load.
Can I use it for settings pages?
Yes, settings and configuration pages are the main use case. Any Nova resource that should have exactly one row, such as global options or site settings, can use the singleton approach. It keeps users on the edit form instead of an index list.
Is it safe to use in production?
It is intended for Nova admin screens, so test it in staging with your exact Laravel and Nova versions before production. Make sure the singleton record exists and that policies still restrict who can view or update it. Since create and delete are hidden, plan how the initial record will be seeded.
How do I test a single-record resource?
Test it like other Nova resources by asserting the navigation link resolves to the edit form and that create and delete actions are absent. Seed one record in your test database so the edit screen can load. Also cover authorization with your Nova policies.
What alternatives should I consider?
You can use a standard Nova resource with policies that block create and delete, plus custom navigation to the edit page. A custom Nova tool or page is another option for fully bespoke settings screens. This package is a simpler choice when you just need singleton resource behavior.
How is the package maintained?
Maintenance should be checked on the package's GitHub repository and Packagist page. Review recent commits, releases, and open issues for compatibility with your Nova version. Pin a version in Composer and retest after Laravel or Nova upgrades.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect