Installation
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 migratePublish-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:
| # | Migration | Effect |
|---|---|---|
| 1 | 0001_create_approvals_table | The approvals decision ledger. |
| 2 | 0002_create_approval_requests_table | Multi-approver approval_requests. |
| 3 | 0003_add_v11_columns_to_approvals_table | Adds decided_by (delegation), weight and approval_request_stage_id. |
| 4 | 0004_add_staging_to_approval_requests_table | Adds staged, reject_on_stage_rejection and workflow. |
| 5 | 0005_create_approval_request_stages_table | The approval_request_stages table for staged pipelines. |
| 6 | 0006_create_approval_delegations_table | The 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 cryptoBy 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.