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 new model changes for review before they’re persisted. Add approvals to your workflow, store pending records in the database, and promote them once approved. Supports PHP 8.3+ and Laravel 12.4+/13.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Regulatory Compliance: Enables controlled data persistence for audit trails (e.g., financial records, legal documents) where approval workflows are mandatory.
  • Multi-Level Approval Workflows: Supports tiered approvals (e.g., "Pending" → "In Review" → "Approved") for content-heavy systems (e.g., CMS, HR portals).
  • Build vs. Buy: Replaces custom approval logic (reducing dev time) or integrates with existing Laravel apps to standardize workflows.
  • Use Cases:
    • Content Moderation: Approve user-generated content (e.g., blog posts, reviews) before publishing.
    • Financial Systems: Validate transactions or reports before database persistence.
    • HR/Compliance: Approve employee records, leave requests, or policy changes.
    • E-Commerce: Review product listings or promotional content before live deployment.

When to Consider This Package

Adopt if:

  • Your Laravel app requires pre-persistence validation for critical data (e.g., financial, legal, or high-stakes content).
  • You need audit trails for changes (e.g., tracking who approved/rejected what and when).
  • Your team lacks time/resources to build a custom approval system from scratch.
  • You’re using Laravel 12.4+ (or Laravel 13) and need modern features like #[Scope] attributes.

Look elsewhere if:

  • You need real-time collaboration (e.g., Google Docs-style approvals) → Consider Laravel Livewire + custom logic.
  • Your approval workflows are highly dynamic (e.g., ad-hoc routing) → A workflow engine (e.g., Laravel Nova Actions, TALL Stack) may fit better.
  • You’re on Laravel 11 or below → Use v2.0 or upgrade Laravel.
  • You require complex role-based permissions → Pair with Laravel’s built-in gates/policies or a package like Spatie’s Permission Manager.

How to Pitch It (Stakeholders)

For Executives: "This package lets us enforce approval workflows for critical data—like financial records or customer-facing content—without building a custom system. It reduces risk by ensuring only authorized changes go live, while providing full audit trails. For example, in our [Product/HR/Compliance System], this would cut approval delays by [X]% and align with [Regulation Y]. The MIT license and Laravel-native design mean low maintenance overhead."

For Engineers: *"This is a lightweight, battle-tested way to add approval workflows to any Laravel model. Key benefits:

  • Zero custom code for core approval logic (just add a trait to your model).
  • Flexible states: Defaults to ‘Pending/Approved/Rejected’ but supports custom states (e.g., ‘In Review’).
  • Time-based automation: Auto-reject or postpone stale approvals (e.g., ‘expire after 48 hours’).
  • Events & Scopes: Integrates seamlessly with Laravel’s ecosystem (e.g., trigger notifications when a post is approved).
  • Performance: Uses JSON columns for dirty data, avoiding bloated tables.

Migration Path:

  1. Install via Composer (composer require cjmellor/approval).
  2. Add use MustBeApproved to models needing approvals (e.g., Post, Invoice).
  3. Configure states in config/approval.php (e.g., add ‘Needs Clarification’).
  4. Set up a cron job to process expired approvals (php artisan approval:process-expired).

Risk Mitigation:

  • Backward Compatible: Works with existing Laravel apps (just add the trait).
  • Audit-Ready: Tracks rolled_back_at, audited_by, and full change history.
  • Extensible: Override methods or add custom logic via events (e.g., ModelApproved)."*
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope