PHPackages                             laravel-auto/filament-approvals - 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. [Admin Panels](/categories/admin)
4. /
5. laravel-auto/filament-approvals

ActiveLibrary[Admin Panels](/categories/admin)

laravel-auto/filament-approvals
===============================

Manage approval processes in your filament application

3.x-dev(11mo ago)031MITPHPPHP ^8.2

Since Jun 15Pushed 11mo agoCompare

[ Source](https://github.com/chareka-legacy/filament-approvals)[ Packagist](https://packagist.org/packages/laravel-auto/filament-approvals)[ Docs](https://github.com/eightynine/filament-approvals)[ RSS](/packages/laravel-auto-filament-approvals/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelogDependencies (10)Versions (1)Used By (0)

Manage approval processes in your filament application
======================================================

[](#manage-approval-processes-in-your-filament-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e08a057bd7930f040717a8171cc7a27fe84d7c545011d2754343fac910aca123/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6569676874796e696e652f66696c616d656e742d617070726f76616c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eightynine/filament-approvals)[![Total Downloads](https://camo.githubusercontent.com/7410c8804f69b3811587a94f1d4af4d51f59216e0ab48f64b8b0919d52ca1a77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6569676874796e696e652f66696c616d656e742d617070726f76616c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eightynine/filament-approvals)

This package allows you to implement approval flows in your Laravel Filament application.

*This package brings the [ringlesoft/laravel-process-approval](https://github.com/ringlesoft/laravel-process-approval)) functionalities to filament. You can use all the ringlesoft/laravel-process-approval features in your laravel project. It also uses the [spatie/laravel-permissions](https://github.com/spatie/laravel-permissions) package, so you can use all its features.*

🛠️ Be Part of the Journey
-------------------------

[](#️-be-part-of-the-journey)

Hi, I'm Eighty Nine. I created aprovals plugin to solve real problems I faced as a developer. Your sponsorship will allow me to dedicate more time to enhancing these tools and helping more people. [Become a sponsor](https://github.com/sponsors/eighty9nine) and join me in making a positive impact on the developer community.

Quick understanding the package
-------------------------------

[](#quick-understanding-the-package)

Some processes in your application require to be approved by multiple people before the process can be completed. For example, an employee submits a timesheet, then the supervisor approves, then manager approves and finally the HR approves and the timesheet is logged. This package is a solution for this type of processes.

### Approval flow

[](#approval-flow)

This is the chain of events for a particular process. For example, timesheet submission, expense request, leave request. These processes require that multiple people have check and approve or reject, until the process is complete.

Approval flows are based on a model, example, ExpenseRequest, LeaveRequest, TimesheetLogSubmission etc

### Approval step

[](#approval-step)

These are the steps that the process has. Each step is associated with a role that contains users that need to approve. When any of the users in the role approves, the process moves forward to the next step.

This package is based on roles, which are provided by the package [spatie/laravel-permission](https://github.com/spatie/laravel-permission).

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

[](#installation)

You can install the package via composer:

```
composer require eightynine/filament-approvals
```

Usage
-----

[](#usage)

1. Run the migrations using:

```
php artisan migrate
```

2. Add the plugin to your panel service provider as follows:

```
    ->plugins([
        \EightyNine\Approvals\ApprovalPlugin::make()
    ])
```

3. Make your model extend the ApprovableModel

```
namespace App\Models;

use EightyNine\Approvals\Models\ApprovableModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class LeaveRequest extends ApprovableModel
{
    use HasFactory;

    protected $fillable = ["name"];
}
```

4. Create approval flows

- In your dashboard, a "Approval flows menu will have appeared". Click it and start creating the approval flows. The name is the name of the model, that you are using in your flow.
- After you create your first approval create the steps. The steps will require that you have already create roles in your admin panel using the spatie/laravel-permission package.
- You can move to the next step 😉

5. Add the approvable actions:

- In your resource table, add the approvable actions

```
$table
    ->actions(
        ...\EightyNine\Approvals\Tables\Actions\ApprovalActions::make(
            // define your action here that will appear once approval is completed
            Action::make("Done"),
            [
                Tables\Actions\EditAction::make(),
                Tables\Actions\ViewAction::make()
            ]
        ),
    )
```

- In your view page or edit page, you can include the approval actions using the trait HasApprovalHeaderActions, and define the method getOnCompletionAction() that will return the action(s) to be shown once complete. If this method is not implemented and you use the trait, an error will be thrown.

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

use App\Filament\Resources\LeaveRequestResource;
use Filament\Actions;
use Filament\Actions\Action;
use Filament\Resources\Pages\ViewRecord;

class ViewLeaveRequest extends ViewRecord
{
    use  \EightyNine\Approvals\Traits\HasApprovalHeaderActions;

    protected static string $resource = LeaveRequestResource::class;

    /**
     * Get the completion action.
     *
     * @return Filament\Actions\Action
     * @throws Exception
     */
    protected function getOnCompletionAction(): Action
    {
        return Action::make("Done")
            ->color("success")
            // Do not use the visible method, since it is being used internally to show this action if the approval flow has been completed.
            // Using the hidden method add your condition to prevent the action from being performed more than once
            ->hidden(fn(ApprovableModel $record)=> $record->shouldBeHidden())
    }
}
```

6. Add the ApprovalStatusColumn to your table to see the status of the approval flow

```
    return $table
        ->columns([
            TextColumn::make("name"),
            \EightyNine\Approvals\Tables\Columns\ApprovalStatusColumn::make("approvalStatus.status"),
        ])
    ...
```

Just like that, you are good to go, make some moneyyyyy🤑

To add more approval flows(models), repeat the steps 3-6

🎨 Customization &amp; Publishing
--------------------------------

[](#-customization--publishing)

This package provides extensive customization options by publishing various components. You can publish and customize configuration files, views, Filament resources, form/table components, translations, and more.

### Quick Publishing

[](#quick-publishing)

Use the custom publish command for an interactive publishing experience:

```
php artisan approvals:publish
```

This will show you an interactive menu to choose what you want to publish.

### Publishing Specific Components

[](#publishing-specific-components)

You can also publish specific components using command options:

#### Configuration File

[](#configuration-file)

```
php artisan approvals:publish --config
```

This publishes the configuration file to `config/approvals.php` where you can customize:

- Role model configuration
- Navigation settings (icon, sort order, visibility)
- Comment settings for approvals and rejections

#### View Files

[](#view-files)

```
php artisan approvals:publish --views
```

This publishes all Blade view files to `resources/views/vendor/filament-approvals/` for complete UI customization:

- `tables/columns/approval-status-column.blade.php` - Customize the approval status display
- `tables/columns/approval-status-column-action-view.blade.php` - Customize approval history view

#### Filament Resources

[](#filament-resources)

```
php artisan approvals:publish --resources
```

This publishes Filament resources to `app/Filament/Resources/` allowing you to:

- Customize the ApprovalFlowResource completely
- Modify forms, tables, and pages
- Add custom validation and business logic

#### Form &amp; Table Components

[](#form--table-components)

```
php artisan approvals:publish --components
```

This publishes reusable components to `app/Forms/Approvals/` and `app/Tables/Approvals/`:

- Custom approval action forms
- Specialized table columns and actions
- Approval workflow components

#### Translation Files

[](#translation-files)

```
php artisan approvals:publish --translations
```

This publishes language files to `resources/lang/vendor/filament-approvals/` for localization:

- Customize all text and messages
- Add support for additional languages
- Modify approval status terminology

#### Development Stubs

[](#development-stubs)

```
php artisan approvals:publish --stubs
```

This publishes stub files to `stubs/filament-approvals/` for development and extension.

#### Publish Everything

[](#publish-everything)

```
php artisan approvals:publish --all
```

This publishes all customizable files at once.

### Configuration Options

[](#configuration-options)

After publishing the config file, you can customize these settings in `config/approvals.php`:

```
return [
    // Specify your role model (must be compatible with spatie/laravel-permission)
    "role_model" => App\Models\Role::class,

    // Navigation configuration
    "navigation" => [
        "should_register_navigation" => true,
        "icon" => "heroicon-o-clipboard-document-check",
        "sort" => 1
    ],

    // Comment settings
    "enable_approval_comments" => false, // Allow comments when approving
    "enable_rejection_comments" => true, // Allow comments when rejecting
];
```

### Customizing Views

[](#customizing-views)

After publishing views, you can completely customize the appearance:

**Approval Status Column (`resources/views/vendor/filament-approvals/tables/columns/approval-status-column.blade.php`)**:

- Modify status display logic
- Customize styling and colors
- Add additional status information

**Approval History View (`resources/views/vendor/filament-approvals/tables/columns/approval-status-column-action-view.blade.php`)**:

- Customize approval history display
- Modify user avatar and information layout
- Enhance comment formatting

### Extending Filament Resources

[](#extending-filament-resources)

When you publish the Filament resources, you gain full control:

```
// In your published ApprovalFlowResource
class ApprovalFlowResource extends Resource
{
    // Add custom form fields
    public static function form(Form $form): Form
    {
        return $form->schema([
            // ... existing fields ...

            // Add your custom fields
            TextInput::make('custom_field')
                ->label('Custom Configuration'),
        ]);
    }

    // Customize table columns
    public static function table(Table $table): Table
    {
        return $table->columns([
            // ... existing columns ...

            // Add custom columns
            TextColumn::make('custom_data')
                ->label('Custom Information'),
        ]);
    }
}
```

### Advanced Customization Tips

[](#advanced-customization-tips)

1. **Custom Approval Actions**: Extend the published form/table components to add custom approval logic
2. **Styling**: Use the published views to match your application's design system
3. **Localization**: Publish translations and add your language files
4. **Business Logic**: Modify the published resources to add organization-specific workflows

### Best Practices

[](#best-practices)

- Always backup your customizations before updating the package
- Use version control to track your customized files
- Test customizations thoroughly in a development environment
- Document your customizations for team members

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Eighty Nine](https://github.com/eighty9nine)
- [Tony Partridge](https://github.com/tonypartridge)
- [Ringlesoft](https://github.com/ringlesoft/laravel-process-approval) for the base approval model logic
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance52

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60.5% 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

331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e270292643f0d9a467ac1010400d65143f8104b15eaafc4bdbb29d16efaa12d6?d=identicon)[joechark](/maintainers/joechark)

---

Top Contributors

[![eighty9nine](https://avatars.githubusercontent.com/u/137639046?v=4)](https://github.com/eighty9nine "eighty9nine (26 commits)")[![tonypartridger](https://avatars.githubusercontent.com/u/103045669?v=4)](https://github.com/tonypartridger "tonypartridger (13 commits)")[![bo3bdo](https://avatars.githubusercontent.com/u/5271380?v=4)](https://github.com/bo3bdo "bo3bdo (1 commits)")[![enzonotario](https://avatars.githubusercontent.com/u/10469299?v=4)](https://github.com/enzonotario "enzonotario (1 commits)")[![jcc5018](https://avatars.githubusercontent.com/u/21000134?v=4)](https://github.com/jcc5018 "jcc5018 (1 commits)")[![jcharika](https://avatars.githubusercontent.com/u/42941541?v=4)](https://github.com/jcharika "jcharika (1 commits)")

---

Tags

laraveleightyninefilament-approvals

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/laravel-auto-filament-approvals/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-auto-filament-approvals/health.svg)](https://phpackages.com/packages/laravel-auto-filament-approvals)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[ralphjsmit/laravel-filament-seo

A package to combine the power of Laravel SEO and Filament Admin.

15398.7k10](/packages/ralphjsmit-laravel-filament-seo)[eightynine/filament-approvals

Manage approval processes in your filament application

12016.7k1](/packages/eightynine-filament-approvals)[geo-sot/filament-env-editor

Access .env file though Filament admin panel

2432.3k1](/packages/geo-sot-filament-env-editor)[caresome/filament-neobrutalism-theme

A neobrutalism theme for FilamentPHP admin panels

303.2k](/packages/caresome-filament-neobrutalism-theme)

PHPackages © 2026

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