---
title: "Configuration — Approvals for Laravel | Roundly"
description: "Every config key and its default — swappable models, morph key type, authorization gate, expiry and workflow presets."
url: https://roundly-consulting.com/open-source/docs/approvals-for-laravel/configuration
language: en
---

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

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

# Configuration

The published config/approvals.php, comments trimmed:

```php
use RoundlyConsulting\Approvals\Models\Approval;
use RoundlyConsulting\Approvals\Models\ApprovalDelegation;
use RoundlyConsulting\Approvals\Models\ApprovalRequest;
use RoundlyConsulting\Approvals\Models\ApprovalRequestStage;

return [
    'model' => Approval::class,
    'request_model' => ApprovalRequest::class,
    'stage_model' => ApprovalRequestStage::class,
    'delegation_model' => ApprovalDelegation::class,

    'key_type' => env('APPROVALS_KEY_TYPE', 'bigint'),

    'authorization' => [
        'enabled' => env('APPROVALS_AUTHORIZATION', false),
        'ability' => 'decide-approval',
    ],

    'expiry' => [
        'default' => null,
    ],

    'workflows' => [
        // named presets — see Workflow presets
    ],
];
```

## Every key

| Key | Default | Env | Purpose |
| --- | --- | --- | --- |
| `model` | Approval::class | — | Model for decisions. Must extend the package’s Approval. |
| `request_model` | ApprovalRequest::class | — | Model for multi-approver requests. Must extend ApprovalRequest. |
| `stage_model` | ApprovalRequestStage::class | — | Model for the stages of a staged request. Must extend ApprovalRequestStage. |
| `delegation_model` | ApprovalDelegation::class | — | Model for delegations. Must extend ApprovalDelegation. |
| `key_type` | bigint | `APPROVALS_KEY_TYPE` | Type of every polymorphic id column — bigint, uuid or ulid. Read by the migrations, so set it before you migrate; anything else throws InvalidConfigurationException. |
| `authorization.enabled` | false | `APPROVALS_AUTHORIZATION` | Gate every decision path — approve, reject, toggle, ask and cancel — through a Gate ability. The env strings true, 1, yes and on enable it, false, 0, no and off disable it, a blank value is not set (so false), and anything else throws InvalidConfigurationException. |
| `authorization.ability` | 'decide-approval' | — | The Gate ability checked against the approvable. Not set (null or blank) means decide-approval; a non-string value throws InvalidConfigurationException rather than checking a different gate. |
| `expiry.default` | null | — | Lifetime in seconds (≥ 1) of an approval given without an explicit expiry; it stops counting once that passes. Not set (null or blank) means approvals never expire unless a decision sets its own; anything else that isn’t a positive whole number throws InvalidConfigurationException. |
| `workflows` | \[\] | — | Named workflow presets. Not set (null or blank) means none; any other non-array value throws InvalidConfigurationException. |

## Environment

Two keys are env-backed:

```bash
APPROVALS_AUTHORIZATION=true
APPROVALS_KEY_TYPE=uuid
```

APPROVALS\_KEY\_TYPE is read when the migrations run, not at runtime — set it before you migrate. It has to fit every model approvals stores a morph id for, including models another package owns (see Models & schema).

## php artisan about

The package adds an Approvals section to php artisan about. It reports the gate ability by presence and the workflow presets by count, so your authorization vocabulary and business-process names never appear in the output:

```bash
php artisan about --only=approvals
```

| Row | Shows |
| --- | --- |
| Model / Request model / Stage model / Delegation model | The class name of each configured model. |
| Authorization | ENFORCED or OFF. |
| Ability | DEFAULT (not set — null or blank — or decide-approval), SET (a custom name, never printed) or INVALID. |
| Default expiry | The expiry.default value in seconds, e.g. 86400s — NEVER, or INVALID when the value would throw. |
| Workflow presets | The number of presets, e.g. 2 defined — NONE, or INVALID when workflows is not an array. |

## 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/approvals-for-laravel.md)
