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
Filament Record Nav

Filament Record Nav Laravel Package

nben/filament-record-nav

Adds zero-config next/previous record navigation buttons to Filament 4/5 admin panels. Drop two actions into getHeaderActions()—no trait required—with configurable ordering, page-type targets, smart boundary disabling, and one query per render. Works on ViewRecord and EditRecord pages.

View on GitHub
Deep Wiki
Context7

Filament Record Navigation adds elegant next/previous record navigation to your Filament admin panels. Drop the two provided actions into getHeaderActions() on any ViewRecord or EditRecord page—no trait or page class changes required—and users can move seamlessly between records.

  • Zero-config integration with no trait required
  • Filament native actions extending Action, so all fluent methods work
  • Page-type aware targets: view, edit, or any custom route
  • Configurable ordering column and direction via config
  • Optimised queries—one database query per render, with buttons auto-disabling at boundaries
Frequently asked questions about Filament Record Nav
How do I install nben/filament-record-nav in a Laravel Filament admin panel?
Install it with composer require nben/filament-record-nav. Optionally publish the config file with php artisan vendor:publish --tag=filament-record-nav-config. It requires PHP 8.2 or newer, Laravel 10 through 13, and Filament 4 or 5. No migrations or page class changes are required for default behavior.
How do I add next and previous record buttons to a Filament ViewRecord or EditRecord page?
Add PreviousRecordAction::make() and NextRecordAction::make() to getHeaderActions() on your ViewRecord or EditRecord page. Import them from Nben\FilamentRecordNav\Actions and return them in the header actions array. No trait is needed for the default behavior.
Does Filament Record Navigation require a trait or changes to my resource page classes?
No trait is required for default next/previous navigation. The two actions work out of the box when added to getHeaderActions(). You can optionally add the provided trait or contract support to override query logic and URL resolution when you need custom behavior.
How do I change the ordering column used for next and previous record navigation?
Publish the package config and set the order column and sort direction globally. The default order_column is id, so resources ordered by created_at, sort_order, or tenant-specific fields need configuration or a query override. Make sure the chosen column is indexed and stable for reliable adjacency.
Does the package respect tenant scoping, global scopes, and authorization policies out of the box?
The default queries are simple and may not cover every tenant, policy, or status filtering requirement. Global scopes and soft deletes may apply depending on your model setup, but you should verify multi-tenant and policy-scoped panels explicitly. Where default scoping is insufficient, override getPreviousRecord() and getNextRecord() at the page level. Do not assume authorization policies alone will constrain navigation correctly.
What happens if two records have the same value in the order column?
Duplicate order values can break adjacency and produce unpredictable next/previous behavior. The package orders by a single configured column, so use a unique or stable ordering value where possible. If duplicates are unavoidable, add a deterministic tie-breaker through a custom query override and test boundary cases.
Can I navigate to a custom page or route instead of the default view or edit page?
Yes. Navigation can target view, edit, or any custom route registered in your resource's getPages() method. Use NavigationPage::custom() and make sure the page keys exactly match your getPages() entries. You can also configure navigateTo() per action to match your UX.
Is Filament Record Navigation compatible with Filament 3, Laravel 10, PHP 8.2, and future upgrades?
It supports Filament 4.x and 5.x, PHP 8.2 or newer, and Laravel 10 through 13. It is not a drop-in for Filament 3 projects, so defer adoption or budget for a fork if you are still on Filament 3. Validate package constraints against your exact versions in CI. Pin the package version and run smoke tests when upgrading Filament or Laravel.
How many database queries does each button run, and is it safe for large tables?
Each action fires exactly one database query per render, which is reasonable for typical back-office admin panels. For high-traffic or very large tables, confirm the order column is indexed and test response times under realistic data volumes. Duplicate order values and missing indexes can make navigation slower or less reliable.
How do I customize button labels, icons, colors, and tooltips, and can I override the query logic?
The actions extend Filament's Action class, so standard fluent methods work for labels, colors, icons, sizes, tooltips, and keybindings. To customize queries or URL resolution, add the optional trait and override any method such as getPreviousRecord() or getNextRecord(). The package uses method_exists checks, so custom methods work without the optional interface. Rollback is simple because removing the actions and Composer dependency involves no data migration.
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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings