visanduma/nova-back-navigation
A Laravel Nova package that adds back-button navigation to Nova screens, letting users quickly return to the previous page or index without losing their place. Simple to install and lightweight, it improves everyday admin workflows by making resource pages easier to move through.
This is a small, single-purpose Nova extension: it re-introduces a "Back" affordance in the Nova UI (the thing Nova removed between versions and users keep asking for). Treat it as a UI augmentation, not infrastructure — install it, verify it, and keep a fallback in mind.
Install
composer require visanduma/nova-back-navigation
php artisan optimize:clear
php artisan nova:publish # only if the package ships publishable assets
Laravel package auto-discovery normally registers the provider. If the button never appears, check registration manually:
config/app.php under providersbootstrap/providers.phpWhere to look first, in this order
vendor/visanduma/nova-back-navigation/src/ — the service provider's boot() tells you everything: does it call Nova::script() / Nova::style(), register a route, or ship a Tool?vendor/visanduma/nova-back-navigation/composer.json — the require block gives you the Nova version constraint and therefore your compatibility answer. This is the single most important file to read before committing.resources/js/ or dist/js/ — find the Vue component and note what DOM anchor it mounts to. Nova's header/breadcrumb markup is the thing most likely to break across Nova upgrades.config/ file — if one exists, publish it; if not, behaviour is likely unconditional and global.First use case to validate
Index → apply a filter/search → open a record → click Back → confirm you land on the filtered index, not a blank one. That single flow exercises the whole package: asset loading, mount point, and history handling. If that works, the rest is polish.
Global injection (the default path). Most installs of a package like this are zero-config: the provider registers an asset and the button renders on every Nova page. Verify it on Detail, Edit, Create, Lens, and custom Tool pages individually — "global" implementations frequently miss Create or custom Tools because those pages have different layouts.
Per-resource scoping. If the package exposes a field, card, or resource method, prefer that over the global button so you can suppress it on resources where back-navigation is meaningless (e.g. dashboard-like resources, embedded reports). If no toggle exists, gate it yourself by wrapping the asset registration in your own NovaServiceProvider::boot() condition, or by publishing and editing the component.
Custom Tools and Pages. Your own nova:tool components can reuse the same behaviour rather than duplicating it. The idiomatic Nova call is the router, not the browser:
// inside a Nova Vue component
this.$router.back() // preferred — keeps Nova's SPA state intact
// window.history.back() // fallback only; can desync Nova's router state
If the package's component uses window.history.back(), that's your first candidate for a local patch.
Pair with breadcrumbs, don't replace them. Back handles the "one step" case; Nova's resource breadcrumb/detail header handles "jump to index" and "jump to parent resource". A button that guesses intent will eventually send a user to the wrong place after a multi-step edit flow. Consider keeping an explicit "Back to Index" link in $title or a header action on Detail pages.
Roll-your-own fallback (worth keeping stubbed). Because the package surface is tiny, the escape hatch is about twenty lines:
// App\Providers\NovaServiceProvider::boot()
Nova::script('back-nav', __DIR__.'/../../resources/js/back-nav.js');
with a component that mounts to the breadcrumb container and calls this.$router.back(). Knowing this makes the dependency low-risk rather than load-bearing.
Compatibility is the whole risk. With zero dependents and a low opportunity score, the realistic failure mode is not "the button is ugly" — it's "the asset doesn't load on Nova 5" or "it mounts to a selector Nova renamed in 4.30". Pin the package in composer.json, and after every Nova upgrade, manually click the button once in staging. There are no other people finding these bugs for you.
Asset caching will waste an afternoon. If you publish or npm run build inside vendor/, remember Nova serves compiled assets and browsers cache aggressively. Symptoms of stale assets: button appears for one developer and not another. Fix order: php artisan optimize:clear → php artisan nova:publish → hard reload → check the Network tab for a 404 on the JS bundle. A 404 there means the provider's Nova::script() path is wrong for your install layout.
history.back() vs $router.back(). Nova is a Vue SPA. Using raw browser history can leave Nova's router believing it is on the page you just left, which shows up later as a broken breadcrumb, a stale resourceId, or a Detail page that renders the previous record's title for a frame. Test the forward navigation after going back.
Mount-point fragility. Any button injected via DOM selector or by prepending into a header container is vulnerable to Nova theme and layout changes. After a Nova minor upgrade, check specifically: mobile/responsive layout (the header reflows), modal-heavy pages, and pages with custom Header components — those are where injected buttons overlap, hide behind, or float over content.
No config = no escape valves. If you find yourself needing "hide it on page X", you are about to hardcode a condition into vendor/. Fork the package into your app namespace (or copy the component into your own asset bundle) before you start patching, so composer update doesn't silently revert your work. This is a package where forking is entirely reasonable.
Debugging checklist when the button is absent:
php artisan about / check bootstrap/providers.php)dd() in the provider's boot()composer.json constraint to composer show laravel/novaSet expectations with your team. This is a convenience affordance. Don't let it become the only way users navigate out of a detail page — keep Nova's native breadcrumbs and "Back to Index" title links in place so that a broken asset on a future Nova upgrade degrades to "missing button" rather than "user is stranded."
How can I help you explore Laravel packages today?