---
title: "Concepts — Requests for Laravel | Roundly"
description: "The Request model, the Status enum, and how the approvals engine drives a request’s outcome."
url: https://roundly-consulting.com/open-source/docs/requests-for-laravel/concepts
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Requests for Laravel](https://roundly-consulting.com/open-source/docs/requests-for-laravel.md)

# Concepts

## Request

RoundlyConsulting\\Requests\\Models\\Request is the claim or application. It has a polymorphic author, a Status enum, free-form meta, a require\_approvals\_from record of the declared approvers’ keys and an optional expires\_at. It is soft-deletable, and its own key follows requests.primary\_key\_type. A new instance is New in memory, so even a raw Request::create(\[...\]) answers isExpired() and takes approve() at once:

```php
$request->status;                  // Status enum — New, Approved, Rejected, Cancelled, Expired
$request->author;                  // polymorphic author (MorphTo), nullable
$request->type;                    // e.g. 'Claim'
$request->title;                   // e.g. 'Expense reimbursement'
$request->description;
$request->meta;                    // Collection — free-form metadata
$request->require_approvals_from;  // Collection — the declared approvers’ keys
$request->expires_at;              // ?Carbon — the expiry deadline

$request->delete();                // soft delete (deleted_at)
```

## Status

RoundlyConsulting\\Requests\\Enums\\Status is a string-backed enum with five cases. It carries isOpen(), isTerminal() and canTransitionTo(), plus the shared enum helpers from enums-for-laravel (see Status & transitions):

```php
use RoundlyConsulting\Requests\Enums\Status;

Status::New;        // open — awaiting a decision
Status::Approved;
Status::Rejected;
Status::Cancelled;
Status::Expired;
```

## The approval engine

A Request is an approvals subject — it uses the engine’s RequiresApproval trait. Declaring approvers (or stages, or a workflow preset) opens an approval round — an ApprovalRequest in the engine — that names those approvers: only they, or someone they delegated to, may decide it. Its rule decides when the bar is met. A listener, SyncRequestStatusFromApproval, mirrors every engine resolution back onto the request’s Status, so the outcome moves the request and fires the requests events no matter how the decision arrived.

## Database schema

The requests table the published migration creates:

| Column | Type | Notes |
| --- | --- | --- |
| `id` | bigint or uuid / ulid | Auto-increment by default; uuid or ulid per primary\_key\_type. |
| `status` | string(16) | Default New. |
| `author_type / author_id` | morph, nullable | The author; the id column follows key\_type. |
| `type` | string, nullable | Your own classifier, e.g. Claim or AccessRequest. |
| `title` | string, nullable | Short headline. |
| `description` | text, nullable | Long-form body. |
| `meta` | json, nullable | Free-form metadata, cast to a Collection. |
| `require_approvals_from` | json, nullable | A record of the declared approvers’ keys, cast to a Collection. |
| `expires_at` | timestamp, nullable, indexed | The expiry deadline. |
| `created_at / updated_at / deleted_at` | timestamps | Requests are soft-deletable. |

## 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](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

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

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/requests-for-laravel.md)
