Skip to content

Installation

Requirements

1. Add the licensed repository

Approval Flows is a commercial plugin distributed through Anystack. After purchase you receive a repository URL and license credentials. Add the repository to your app's composer.json:

composer config repositories.approval-flows composer https://approval-flows.composer.sh

When Composer prompts for authentication, use your account email as the username and your license key as the password (Anystack shows the exact values on your license page).

2. Require the package

composer require talivio/filament-approval-flows

3. Publish and run the migrations

php artisan vendor:publish --tag="approval-flows-migrations"
php artisan migrate

This creates four tables: approval_flows, approval_steps, approvals, and approval_actions. Table names are configurable — see below.

4. (Optional) Publish the config

php artisan vendor:publish --tag="approval-flows-config"
// config/approval-flows.php
return [
    'user_model' => null, // null = config('auth.providers.users.model')

    'table_names' => [
        'flows' => 'approval_flows',
        'steps' => 'approval_steps',
        'approvals' => 'approvals',
        'approval_actions' => 'approval_actions',
    ],

    'approver_resolver' => \Talivio\ApprovalFlows\Support\DefaultApproverResolver::class,

    'escalation' => [
        'enabled' => true,
        'default_after_hours' => 48,
    ],

    'notifications' => [
        'database' => true,
        'mail' => true,
    ],
];

5. Register the plugin in your panel

use Talivio\ApprovalFlows\ApprovalFlowsPlugin;
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(ApprovalFlowsPlugin::make());
}

By default this registers two panel components: the Approval Inbox page and the Approval Flows management resource. You can disable either:

ApprovalFlowsPlugin::make()
    ->inboxPage(false)     // hide the inbox page
    ->flowResource(false); // hide the flow-management resource

6. Add the trait to a model

use Talivio\ApprovalFlows\Concerns\HasApprovals;

class PurchaseOrder extends Model
{
    use HasApprovals;
}

You're ready. Continue to the Quickstart to define your first flow and submit a record.