cjmellor/approval
Laravel package to stage and review model changes before they’re persisted. It stores pending/new or amended data (approve/reject states) so you can build your own approval workflow. Includes migrations and configurable states/tables.
A complete overhaul — every source file reviewed, refactored, and tested to 100% coverage. Built for Laravel 11, 12, and 13.
Full upgrade guide: UPGRADE.md
thenDo(callable) removed — Renamed to thenCustom() with no parameter. The callback was silently discarded in v1. Move custom expiration logic to an ApprovalExpired event listener.ModelRolledBackEvent renamed to ModelRolledBack — Update imports and event listener type-hints.Cjmellor\Approval\Facades\Approval is gone. Use Cjmellor\Approval\Models\Approval directly.config('approval.approval.approval_pivot') → config('approval.approval_pivot'). Re-publish your config: php artisan vendor:publish --tag="approval-config" --force$approval property — Now typed as Approval instead of Model. Update any type-hints in event listeners.pending() scope — Now excludes approvals with custom states set. Use whereState('pending') for the old behaviour.ExpirationAction enum instead of raw strings. $approval->expiration_action === ExpirationAction::Reject instead of === 'reject'.$guarded = [] replaced with explicit $fillable. Use forceFill() if you were mass-assigning non-standard columns.ExpirationAction enum — Type-safe expiration actions (Reject, Postpone, Custom)ApprovalEvent base class — All events share typed Approval $approval and ?Authenticatable $user propertiesApprovalStatus::values() helper — Derive standard state values from the enumactioned_by tracking — Expired approvals record who processed themapproval-development — Full API reference for AI-assisted developmentapproval-upgrade-v2 — Automated v1→v2 migration runbookprocessExpired() resilience — Chunked queries, per-approval error handling, pending-only filtergetState() bug fix — No longer returns null for standard states after v2 migrationJSON_THROW_ON_ERROR, class_uses_recursive(), strict in_array(), explicit $fillabledown() methodscomposer require cjmellor/approval:"^2.0"
php artisan vendor:publish --tag="approval-migrations"
php artisan approval:upgrade-to-v2
php artisan migrate
php artisan vendor:publish --tag="approval-config" --force
See UPGRADE.md for the full guide with all breaking changes and before/after examples.
Using Laravel Boost? The approval-upgrade-v2 skill can automatically search your codebase and apply all breaking changes.
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.6...v2.0.0
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.5...v1.6.6
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.4...v1.6.5
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.3...v1.6.4
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.2...v1.6.3
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.1...v1.6.2
Full Changelog: https://github.com/cjmellor/approval/compare/v1.6.0...v1.6.1
Full Changelog: https://github.com/cjmellor/approval/compare/v1.5.0...v1.6.0
[!IMPORTANT] This release requires that you're using >= PHP 8.2. If you're not, stick to the previous version.
Full Changelog: https://github.com/cjmellor/approval/compare/v1.4.5...v1.5.0
Full Changelog: https://github.com/cjmellor/approval/compare/v1.4.4...v1.4.5
Full Changelog: https://github.com/cjmellor/approval/compare/v1.4.3...v1.4.4
Full Changelog: https://github.com/cjmellor/approval/compare/v1.4.2...v1.4.3
Full Changelog: https://github.com/cjmellor/approval/compare/v1.4.1...v1.4.2
Full Changelog: https://github.com/cjmellor/approval/compare/v1.4.0...v1.4.1
Full Changelog: https://github.com/cjmellor/approval/compare/v1.3.1...v1.4.0
Full Changelog: https://github.com/cjmellor/approval/compare/v1.3.0...v1.3.1
Full Changelog: https://github.com/cjmellor/approval/compare/v1.2.0...v1.3.0
Full Changelog: https://github.com/cjmellor/approval/compare/v1.1.5...v1.2.0
approvalable_type by @mtawil in https://github.com/cjmellor/approval/pull/31Full Changelog: https://github.com/cjmellor/approval/compare/v1.1.4...v1.1.5
Full Changelog: https://github.com/cjmellor/approval/compare/v1.1.3...v1.1.4
Full Changelog: https://github.com/cjmellor/approval/compare/v1.1.2...v1.1.3
Full Changelog: https://github.com/cjmellor/approval/compare/v1.1.1...v1.1.2
Full Changelog: https://github.com/cjmellor/approval/compare/v1.1.0...v1.1.1
Full Changelog: https://github.com/cjmellor/approval/compare/v1.0.1...v1.1.0
whereJsonContains instead of exact match query by @rawilk in https://github.com/cjmellor/approval/pull/7Full Changelog: https://github.com/cjmellor/approval/compare/v1.0.0...v1.0.1
Initial release
How can I help you explore Laravel packages today?