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 Back Navigation Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  • Laravel ≤ 10 / Nova 4 → add the provider to config/app.php under providers
  • Laravel 11+ / Nova 5 → add it to bootstrap/providers.php

Where to look first, in this order

  1. 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?
  2. 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.
  3. 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.
  4. Any 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.

Implementation Patterns

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.

Gotchas and Tips

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:

  • Provider auto-discovered? (php artisan about / check bootstrap/providers.php)
  • Asset registered? temporarily dd() in the provider's boot()
  • Asset served? Network tab, look for the package's JS filename
  • Component mounting? Vue Devtools → is the component in the tree but positioned off-screen (CSS) or not instantiated at all (selector mismatch)?
  • Nova version match? Compare composer.json constraint to composer show laravel/nova

Set 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."

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