---
title: "Delegated approvers — Requests for Laravel | Roundly"
description: "Let an approver on leave hand their authority to a stand-in for a time window."
url: https://roundly-consulting.com/open-source/docs/requests-for-laravel/delegation
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)

# Delegated approvers

An approver on leave can hand their authority to a stand-in through the approvals engine:

```php
use RoundlyConsulting\Approvals\Facades\Approvals;

Approvals::delegations($alice)->to($bob)->until(now()->addWeek())->grant();
// or: $alice->delegateApprovalsTo($bob, until: now()->addWeek());

// While the delegation is active, Bob's decision counts as Alice's:
Requests::approve($request, $bob);
```

While the delegation is active, Requests::approve($request, $bob) counts as Alice’s decision.

## Delegation windows

Set the window with from(), until() or for() — nothing is written until grant(), and without a window the delegation is open-ended. Revoke it when it is no longer needed:

```php
use RoundlyConsulting\Approvals\Facades\Approvals;

Approvals::delegations($alice)->to($bob)->grant();                           // open-ended
Approvals::delegations($alice)->to($bob)->from(now()->addDay())->until(now()->addWeeks(2))->grant();
Approvals::delegations($alice)->to($bob)->for(3600)->grant();                // seconds from the start

Approvals::delegations($alice)->revoke($bob);   // revoke delegations to Bob
Approvals::delegations($alice)->revoke();       // revoke all active delegations — returns the count
```

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