Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Approval Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Regulatory Compliance & Data Integrity: Enables controlled workflows for sensitive data (e.g., financial records, user-generated content, or medical data) where manual review is required before persistence.
  • Feature Roadmap for Moderation Systems: Accelerates development of approval workflows (e.g., admin dashboards for content moderation, legal review queues, or multi-tiered validation).
  • Build vs. Buy Decision: Avoids reinventing approval logic for Laravel apps, reducing technical debt while maintaining flexibility for custom business rules.
  • Use Cases:
    • Content Platforms: Moderate user-generated content (e.g., blog posts, comments) before publishing.
    • Financial Systems: Validate transactions or reports before they’re finalized.
    • Healthcare Apps: Ensure patient data or treatment plans meet compliance before saving.
    • E-commerce: Approve product listings or discounts before they go live.
    • Internal Tools: Implement multi-level sign-offs for critical updates (e.g., database migrations, API changes).

When to Consider This Package

Adopt if:

  • Your Laravel app requires pre-persistence validation for specific models (e.g., user-submitted data).
  • You need audit trails for approval/rejection actions (who approved, when, and why).
  • Your workflow includes time-based expirations (e.g., auto-reject pending items after 48 hours).
  • You want to decouple approval logic from business logic (e.g., separate admin panels for approvals).
  • You’re using Laravel 11+ and need a lightweight, trait-based solution.

Look elsewhere if:

  • You need real-time collaboration (e.g., concurrent edits with approvals) → Consider Laravel Livewire + custom workflows.
  • Your approval process requires complex conditional logic (e.g., matrix-based rules) → Build a custom service layer.
  • You’re not using Laravel → This package is Laravel-specific.
  • You need offline/async approvals (e.g., email-based workflows) → Explore Laravel Queues + Notifications.
  • Your team lacks PHP/Laravel expertise → Evaluate no-code tools (e.g., Airtable, Zapier) for simpler workflows.

How to Pitch It (Stakeholders)

For Executives: *"This package lets us automate manual approvals for critical data—like user content, financial records, or compliance-sensitive updates—without building custom workflows from scratch. It’s like adding a ‘moderation queue’ to our database with audit logs, timeouts, and role-based actions. For example, we could use it to:

  • Reduce errors by ensuring only approved data persists (e.g., no typos in product listings).
  • Save time by auto-rejecting stale requests (e.g., drafts sitting for >72 hours).
  • Scale compliance by tracking who approved/rejected what and when. It’s a low-code, high-impact way to enforce governance without hiring workflow engineers."*

For Engineers: *"This is a batteries-included approval system for Laravel that:

  • Stores drafts of model changes in an approvals table (polymorphic, JSON-serialized).
  • Supports custom states (e.g., ‘Pending’, ‘In Review’, ‘Needs Info’) via config.
  • Integrates with Laravel’s ecosystem:
    • Events for approval lifecycle hooks (e.g., ModelApproved).
    • Scopes to query pending/approved/rejected items (e.g., Approval::pending()->get()).
    • Time-based expirations with scheduler support (approval:process-expired).
  • Minimal boilerplate: Just add the MustBeApproved trait to your model.
  • Flexible: Bypass approvals for specific attributes or users, or roll back changes conditionally. Tradeoff: It’s opinionated (e.g., uses user_id as the default foreign key), but customizable. Ideal for apps where approvals are a core feature, not a niche requirement."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests