Weave 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
Approvals For Laravel

Approvals For Laravel Laravel Package

roundly-consulting/approvals-for-laravel

Approvals for Laravel adds flexible approval workflows to Eloquent models. Route records through approval chains, assign approvers, and track decisions with a simple API, making it easy to build review and sign-off processes into your Laravel applications.

View on GitHub
Deep Wiki
Context7

Record polymorphic approvals between Eloquent models for Laravel.

Frequently asked questions about Approvals For Laravel
What is roundly-consulting/approvals-for-laravel used for?
It is a Laravel package for recording polymorphic approvals between Eloquent models. You can route records through approval chains, assign approvers, and track approve or reject decisions through a simple API. It is aimed at building review and sign-off flows, such as content publishing reviews, expense sign-off, or change requests, directly into your Laravel application instead of hand-rolling approval tables.
How do I install approvals-for-laravel in a Laravel project?
Install it with Composer using composer require roundly-consulting/approvals-for-laravel. After that, check the repository README for any required service provider registration, config publishing, or migration steps, since the package needs a table to store approval records. Always commit your composer.json and composer.lock changes so other environments install the same version.
What does "polymorphic approvals" actually mean in this package?
It means a single approvals relationship can attach to any Eloquent model, not just one specific type. A model such as an Invoice, an Article, or a SupportTicket can all be routed for approval without needing separate approval tables per model. On the approver side, the same flexibility typically lets users, teams, or other models act as approvers through morph relationships.
How do I make an existing Eloquent model approvable?
Typically you add the package's trait to the model you want to route through a workflow, which gives it relationships and helper methods for starting approvals, attaching approvers, and reading decisions. The exact trait name and method signatures are documented in the repository README, so confirm them against the installed version before refactoring. Apply it only to models that genuinely need review, since each approvable model adds approval rows and query joins.
Can I build multi-step approval chains with it?
Yes, the package is designed around approval chains, so a record can move through more than one approval step with different approvers at each stage. That makes it suitable for tiered sign-off, such as a manager approving first and finance approving afterwards. You control the chain composition in your application code, which keeps the workflow logic explicit and testable rather than hidden in configuration.
Which Laravel and PHP versions does this package support?
Supported versions are declared in the package's composer.json, so check that file or the Packagist page against your application's Laravel and PHP constraints before installing. Because approval packages often rely on newer Eloquent relationship features, verify compatibility on your exact framework version rather than assuming it works everywhere. Running composer require in a branch and letting Composer resolve the constraint is the quickest way to see if there is a conflict.
How do I test approval flows in my application?
Use Laravel's testing helpers with RefreshDatabase so the approvals table is migrated for each test run, then create models and approvers with factories and assert on the recorded decisions. Because approvals are polymorphic, assert both the approvable record and the approver model to catch mismatched morph types. Keep a small number of focused tests per workflow stage so a failing approval chain points directly at the broken step.
Does it work with UUID or ULID primary keys?
Polymorphic approval records store the approvable model's key alongside its morph type, so non-integer keys generally work as long as the approval table's columns match the key type you use. If you use UUIDs or ULIDs, make sure any published migration defines the morph key column as a string or UUID rather than a big integer. Test the migration on a scratch database first to confirm the column types line up with your models.
Is this package safe to use in production?
It is a small, focused package from Roundly Consulting, so evaluate it like any other dependency: check the release history on Packagist, review open issues, confirm the license suits you, and read the source for the parts of the workflow you depend on. Pin a specific version in composer.lock and cover your critical approval paths with tests so a future update cannot silently change behaviour. If the package is not actively maintained, you can fork it, since the approval logic is small enough to audit.
What are the alternatives to using an approvals package?
You can model approvals yourself with a polymorphic pivot table plus status columns and events, which gives full control but means writing and maintaining the workflow logic. Other options include dedicated workflow or state machine packages that handle approvals as one part of a broader state transition graph, or queue-based review tooling when approvals happen outside the application. Choose this package when you want a narrow, Eloquent-native approval record rather than a full workflow engine.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo