NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages

Open source

Requests for Laravel

Install
composer require roundly-consulting/requests-for-laravel
Requires: PHP ^8.4 · Laravel ^12.0|^13.0

Overview

Native request-and-approval workflows for Laravel. Any model — a user, a customer, a team — submits a request, and it resolves once the approvers you declare sign off under the rule you pick: unanimous, quorum, first approver wins or weighted. Multi-stage pipelines, named workflow presets, delegation, per-decision reasons with an audit trail, auto-expiry and granular events are built in. MIT-licensed and dependency-light — it builds only on Laravel and our own approvals-for-laravel engine.

What you get

Requests from any model

A polymorphic author, a type, title, description and free-form meta — raised by a user, a customer, a team or anything else.

Four approval rules

Unanimous by default, or a quorum, first-approver-wins, or a weighted vote where a senior approver can clear the bar alone.

Pipelines & presets

Sequential multi-stage sign-off (manager, then finance, then director) and named workflow presets you define once in config.

Delegation & audit trail

Hand authority to a stand-in for a time window; every decision is stored with its actor, reason and timestamp.

Guarded lifecycle

Five statuses — New, Approved, Rejected, Cancelled, Expired — with an opt-in guard that rejects illegal moves.

Auto-expiry

A per-request deadline or a global TTL, and a schedulable requests:expire command with a dry run.

Facade, DI or actions — and a fake

The Requests facade, an injected RequestManager or plain actions, seven granular events, and a recording Requests::fake().

Documentation

Installation

Install via Composer, then publish and run both the requests and the approvals-engine migrations.

Configuration

Every config/requests.php key and its default — model, author key type, transition guard, TTL and facade alias.

Concepts

The Request model, the Status enum, and how the approvals engine drives a request’s outcome.

Model setup

Let models approve with the GivesApprovals trait and author requests with the HasRequests trait.

The Requests facade

Every Requests facade method in one place — create, approve, reject, reopen, cancel, expire, expireDue and canTransition.

DI, actions & the DTO

Skip the facade: inject RequestManager, or run CreateRequest, ResolveRequest and the other actions with the typed CreateRequestDto.

Creating requests

Build and save requests fluently with Requests::make() — author, type, meta, approvers and expiry in one chain.

Resolving requests

Approve, reject and reopen requests with a per-decision reason; every decision lands in the engine’s audit trail.

Approval rules

Choose unanimous, quorum, any or weighted per request, and give senior approvers extra weight.

Multi-stage pipelines

Route a request through sequential stages — each opens only once the previous one clears.

Workflow presets

Define rule, quorum and stage wiring once in config/approvals.php and open requests against it by name.

Delegated approvers

Let an approver on leave hand their authority to a stand-in for a time window.

Status & guarded transitions

The five statuses, their helpers, the lifecycle graph, and the opt-in guard that rejects illegal moves.

Cancel & expire

Cancel or expire requests on demand, stamp deadlines per request or globally, and expire stale ones on a schedule.

Query scopes

Filter requests by status, author and deadline with ready-made Eloquent scopes.

Inspecting approvals

Check who decided what, the engine’s approval status, the open stage and a progress snapshot like 2 of 3.

Events

Seven events for creation, status changes, recorded and revoked approvals, rejection, cancellation and expiry.

Exceptions & translations

One RequestException hierarchy with typed subclasses and translatable messages.

Artisan commands

requests:expire expires stale requests with a dry run and chunking; about reports the package setup.

Testing

Swap in Requests::fake() to record every call without database writes, or test the real engine with factory states.

Requirements

PHP 8.4+ and Laravel 12 or 13; the approvals engine, enum helpers and package toolkit install automatically.

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 crypto

By 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.