robyconte/filament-flow
Filament Flow is a plugin for building visual, node-based workflows and pipelines inside Filament panels. Design flows with a drag-and-drop canvas, connect steps, and control transitions without leaving your admin panel.
composer require and publish the package assets: config, migrations, and translations (vendor:publish --tag=filament-flow-config, --tag=filament-flow-migrations, --tag=filament-flow-lang — confirm exact tags in the package README, they vary between releases).StateBulkActionGroup usage example in the docs for a Filament resource table.StateBulkActionGroup::forDatabaseRecord(only: ['submit', 'approve'])
->label('Change state');
Bulk actions are the highest-leverage feature here — they let an admin move many records through a workflow in one click while still respecting per-record guards and policies. Start with an explicit allow-list rather than null so you see exactly which transitions are exposed.
forDatabaseRecord(only: [...]) takes transition names. Use ['publish', 'archive'] style lists in production resources and reserve null (all transitions) for internal/admin-only panels. Pass [] to register the action but expose nothing — handy for feature-flagging a bulk action off without editing the table schema.getAvailableTransitions() offers that user. This means one bulk button can legitimately perform approve_level_1 on some records and approve_level_2 on others if they display the same. Design your transition labels with that in mind: if two transitions must be visibly distinct in the UI, give them distinct labels.filament-flow.bulk_action.not_available (EN/IT) for this; use it rather than hand-rolling copy.DiffsWorkflowDefinition::stateChanged now detects changes to a state's metadata, so edits to labels, colours, SLA durations, or flags stored in metadata are applied to workflows already in the database. Treat the workflow definition as code: change it, run your planner/sync step (artisan command or deploy hook), and let it reconcile. This is the cleanest way to version workflow metadata without manual SQL.filament-flow.bulk_action.* instead of overriding the vendor directory, so package updates don't clobber your strings.getAvailableTransitions() for a given user/record pair, then assert the bulk action result. This is where the majority of workflow bugs live — not in the transition definitions themselves but in who is allowed to take them.hidden() to make the button disappear for some rows, that assumption is wrong — the action appears, and non-applicable records are skipped or reported. Move that logic into guards/policies so it surfaces as a report rather than an invisible rule.null vs [] are opposites. null = every transition (the old behaviour, backwards compatible); [] = none. A ?? [] in your own code will silently disable the action — be deliberate.$only filtering but changes what the user sees. Two transitions with identical label + target state become one action, yet $only filters by transition name. If you list only one of a duplicate pair, verify in a test which action actually renders — the merge can surprise you.getAvailableTransitions() for the acting user and that record. Nine times out of ten it is the guard, the actor resolution, or a policy — not the bulk action.filament-flow.bulk_action.not_available in the UI, your locale isn't published or the app locale falls outside EN/IT.How can I help you explore Laravel packages today?