NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages

Require the package. The service provider, the Approvals facade alias and the global approvals() helper are auto-discovered — nothing to register:

composer require roundly-consulting/approvals-for-laravel

php artisan vendor:publish --tag="approvals-migrations"
php artisan migrate

Publish-only migrations

The migrations are not loaded automatically — php artisan migrate creates nothing until you have published them. The six files land in database/migrations with timestamps that preserve their order, so migrate creates the four tables and applies the two schema additions in the order they depend on:

#MigrationEffect
10001_create_approvals_tableThe approvals decision ledger.
20002_create_approval_requests_tableMulti-approver approval_requests.
30003_add_v11_columns_to_approvals_tableAdds decided_by (delegation), weight and approval_request_stage_id.
40004_add_staging_to_approval_requests_tableAdds staged, reject_on_stage_rejection and workflow.
50005_create_approval_request_stages_tableThe approval_request_stages table for staged pipelines.
60006_create_approval_delegations_tableThe approval_delegations table.

Do the models that give or receive approvals use UUID or ULID keys? Set key_type before you migrate — it types every polymorphic id column (see Models & schema).

Config (optional)

The package runs with zero host configuration. Publish the config only when you want to change a default:

php artisan vendor:publish --tag="approvals-config"

The only publish tags are approvals-migrations and approvals-config — the package ships no views or translations.

Next steps

  • Add GivesApprovals to the model that decides and HasApprovals to the model that is decided on.
  • Add RequiresApproval to anything that needs sign-off from several approvers.
  • Record your first decision with the Approvals facade.

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.