Download the PHP package ht3aa/status-tabs without Composer
On this page you can find all versions of the php package ht3aa/status-tabs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ht3aa/status-tabs
More information about ht3aa/status-tabs
Files in ht3aa/status-tabs
Package status-tabs
Short Description Add tabs according to the casts class of the status column (or column specifiy by you)
License MIT
Homepage https://github.com/ht3aa/status-tabs
Informations about the package status-tabs
Add tabs according to the casts class of the status column (or column specifiy by you)
Installation
You can install the package via composer (only support filament v3):
Usage
This package provides a StatusTabs class that automatically generates tabs in your Filament resource list page based on the status enum of your model.
Requirements
- Your model must have a
statuscolumn cast to an enum class - Your enum class must implement
getLabel()andgetIcon()methods
Example Enum
Example Model
Using in Filament Resource
In your Filament resource's list page, extend StatusTabs instead of ListRecords:
The StatusTabs class will automatically:
- Create an "All" tab showing all records
- Create a tab for each status enum case
- Display the status label, icon, and count badge for each tab
- Filter records by status when a tab is selected
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Hasan Tahseen
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of status-tabs with dependencies
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0