This package allows you to easily implement approval workflows in your Filament-powered Laravel application. You can
define approval logic per model, specify who can approve (based on roles, permissions, or user logic), and expose
powerful UI actions using Filament’s Infolist components.
- ✅ Native PHP Enums for status handling
- 🔁 Define multiple approval flows per model
- 👥 Role-, user-, and permission-based approval logic
- 🧩 Seamless integration with Filament Actions and Forms
- 🎨 Customize icons, labels, tooltips, colors per status
- 🛡️ Control button visibility and approval flow states based on business logic
- 🔔 Built-in confirmation prompts and notifications
- 🧱 Fully expandable
| Filament Version | Package Version |
|---|---|
| 3.x | ^1.0.0 |
| 4.x | ^2.0.0 |
| 5.x | --- |
You can find the full documentation here.
(The lower section are the Approvals)
You can install the package via composer:
composer require ffhs/filament-package_ffhs_approvals You can publish the config file with:
php artisan vendor:publish --tag="filament-package_ffhs_approvals-config" You can publish and run the migrations with:
php artisan vendor:publish --tag="filament-package_ffhs_approvals-migrations"
php artisan migrate Create a PHP Enum implementing HasApprovalStatuses:
use Ffhs\Approvals\Contracts\HasApprovalStatuses;
enum MyApprovalStatus: string implements HasApprovalStatuses
{
case APPROVED = 'approved';
case INCOMPLETE = 'incomplete';
case DENIED = 'denied';
public static function getApprovedStatuses(): array
{
return [self::APPROVED];
}
public static function getDeniedStatuses(): array
{
return [self::DENIED];
}
public static function getPendingStatuses(): array
{
return [self::INCOMPLETE];
}
}Implement Approvable and use the HasApprovals trait:
namespace App\Models;
class MyModel extends Model implements Approvable{
use HasApprovals;
public function getApprovalFlows(): array
{
return [
'management_approved' => SimpleApprovalFlow::make()
->approvalStatus(ApplicationApprovalStatus::cases())
->aprovalBy([
SimpleApprovalBy::make('employee')
->any(),
SimpleApprovalBy::make('manager')
->permission('can_approve_for_manager'),
SimpleApprovalBy::make('hr')
->role('hr_role')
->atLeast(2)
])
];
}
}Render the approval action in your Filament resource or view:
// MyModelView.php
ApprovalActions::make('managment_aproved')composer install
./vendor/bin/testbench vendor:publish --tag="filament-package_ffhs_custom_forms-migrations"
./vendor/bin/testbench workbench:build
./vendor/bin/pest test The MIT License (MIT). Please see License File for more information.

