Download the PHP package hayder/navigation-buttons without Composer
On this page you can find all versions of the php package hayder/navigation-buttons. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hayder/navigation-buttons
More information about hayder/navigation-buttons
Files in hayder/navigation-buttons
Package navigation-buttons
Short Description A Filament plugin to add previous and next navigation buttons to resource pages.
License MIT
Informations about the package navigation-buttons
This Package developed based on this article https://filamentphp.com/content/leandrocfe-navigating-filament-pages-with-previous-and-next-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
- 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
- Laravel: ^9.x or ^10.x
- PHP: ^8.0
- Filament: ^3.0
Installation
-
Install the package via Composer:
Run the following command in your terminal to install the package:
-
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:
This will create a configuration file at
config/navigation-buttons.php
where you can define your custom settings. -
Publish the Translation Files (Optional):
If you want to customize the button labels or other translation strings, publish the translation files:
Usage
Apply the HasNavigationButtons
Trait to Your Filament Resource Page:
In the EditRecord
or any other Filament resource page, apply the HasNavigationButtons
trait:
The trait will automatically add the "Previous" and "Next" buttons to the resource page header.
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:
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
If you wish to customize the labels for the buttons, you can modify the translation files after publishing them.
License
This package is open-source software licensed under the MIT license.