PHPackages                             hayder/navigation-buttons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hayder/navigation-buttons

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hayder/navigation-buttons
=========================

A Filament plugin to add previous and next navigation buttons to resource pages.

v1.0.0(1y ago)110MITPHPPHP ^8.0

Since Oct 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/HayderHatem/navigation-buttons)[ Packagist](https://packagist.org/packages/hayder/navigation-buttons)[ RSS](/packages/hayder-navigation-buttons/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

This Package developed based on this article

Navigation Buttons
==================

[](#navigation-buttons)

**Navigation Buttons** is a simple Laravel package for adding "Previous" and "Next" navigation buttons to Filament resource pages, allowing users to navigate between records easily.

Features
--------

[](#features)

- Adds "Previous" and "Next" buttons on Filament resource pages.
- Handles navigation across records in a user-friendly manner.
- Provides notifications if no previous or next records are available.

Requirements
------------

[](#requirements)

- **Laravel**: ^9.x or ^10.x
- **PHP**: ^8.0
- **Filament**: ^3.0

Installation
------------

[](#installation)

1. **Install the package via Composer:**

    Run the following command in your terminal to install the package:

    ```
    composer require hayder/navigation-buttons
    ```
2. **Publish the configuration file (optional):**

    If you wish to customize the package configuration (such as order column or direction), you can publish the configuration file:

    ```
    php artisan vendor:publish --tag="navigation-buttons-config"
    ```

    This will create a configuration file at `config/navigation-buttons.php` where you can define your custom settings.
3. **Publish the Translation Files (Optional):**

    If you want to customize the button labels or other translation strings, publish the translation files:

    ```
    php artisan vendor:publish --tag="navigation-buttons-translations"
    ```

### Usage

[](#usage)

#### Apply the `HasNavigationButtons` Trait to Your Filament Resource Page:

[](#apply-the-hasnavigationbuttons-trait-to-your-filament-resource-page)

In the `EditRecord` or any other Filament resource page, apply the `HasNavigationButtons` trait:

```
namespace App\Filament\Resources\SomeResource\Pages;

use Filament\Resources\Pages\EditRecord;
use App\Filament\Resources\SomeResource;
use Hayder\NavigationButtons\Traits\HasNavigationButtons;
use Hayder\NavigationButtons\Actions\GoToPreviousRecordAction;
use Hayder\NavigationButtons\Traits\HasNavigationButtons;

class EditPage extends EditRecord
{
    use HasNavigationButtons;

    protected static string $resource = SomeResource::class;

    protected function getHeaderActions(): array
    {
        return [
            ...

            GoToPreviousRecordAction::make(),
            GoToNextRecordAction::make(),
        ]
    }
}
```

The trait will automatically add the "Previous" and "Next" buttons to the resource page header.

#### Notifications for Navigation:

[](#notifications-for-navigation)

The package will show a notification if no previous or next record is available.

Example of a notification when there's no next record:

```
Notification::make()
->title('No next record found')
->danger()
->body('You are already at the last record.')
->send();
```

#### Configuration

[](#configuration)

The package comes with a configuration file that allows you to customize the following:

`order_column` : The column used to order records for navigation. `order_direction` : The direction for ordering records (either asc or desc). To modify these settings, publish the configuration file and update the values in `config/navigation-buttons.php`.

#### Customization

[](#customization)

If you wish to customize the labels for the buttons, you can modify the translation files after publishing them.

```
return [
    'previous' => 'Previous Record',
    'next' => 'Next Record',
];
```

### License

[](#license)

This package is open-source software licensed under the MIT license.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

576d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/747a8cc9aa7af352419e64524e8de0910a562a5c48790539b5794cbc1d3cf7f8?d=identicon)[HayderHatem](/maintainers/HayderHatem)

---

Top Contributors

[![HayderHatem](https://avatars.githubusercontent.com/u/35098833?v=4)](https://github.com/HayderHatem "HayderHatem (7 commits)")

### Embed Badge

![Health badge](/badges/hayder-navigation-buttons/health.svg)

```
[![Health](https://phpackages.com/badges/hayder-navigation-buttons/health.svg)](https://phpackages.com/packages/hayder-navigation-buttons)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[datlechin/filament-menu-builder

Create and manage menus and menu items

13550.3k2](/packages/datlechin-filament-menu-builder)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[codewithdennis/filament-lucide-icons

A Filament plugin that integrates Lucide icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.

4529.4k2](/packages/codewithdennis-filament-lucide-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
