Actions
Filament Fluent plugin provides also some Filament actions, that you may want to use.
View Workflow
This action will let you add a button into your Page / Resource / Table header to show the diagram representation of your workflow.
Page action
Use Devaslanca\Fluent\Filament\Actions\Page\ViewWorkflow
inside your Filament page or resource header actions:
<?php
namespace App\Filament\Resources\ProjectResource\Pages;
use App\Filament\Resources\ProjectResource;use Devaslanca\Fluent\Filament\Actions\Page\ViewWorkflow;use Filament\Resources\Pages\ManageRecords;
class ManageProjects extends ManageRecords{ protected static string $resource = ProjectResource::class;
protected function getHeaderActions(): array { return [ ViewWorkflow::make(), // <-
// ... ]; }}
Table action
Use Devaslanca\Fluent\Filament\Actions\Table\ViewWorkflow
inside your Filament table header actions:
use Devaslanca\Fluent\Filament\Actions\Table\ViewWorkflow;
// ...
public function table(Table $table): Table{ return $table ->columns([ // ... ]) ->headerActions([ ViewWorkflow::make(), Tables\Actions\CreateAction::make(), ]);}
These actions will show a Filament action that will show a modal with a diagram representation of your model active Workflow: