---
title: "Approval rules — Requests for Laravel | Roundly"
description: "Choose unanimous, quorum, any or weighted per request, and give senior approvers extra weight."
url: https://roundly-consulting.com/open-source/docs/requests-for-laravel/approval-rules
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)

# Approval rules

Pick a rule — and a quorum, where relevant — on the builder:

```php
use RoundlyConsulting\Approvals\Enums\ApprovalRule;

// Any 2 of 3 managers (first-past-the-post quorum):
Requests::make()
    ->requireApprovalsFrom([$a, $b, $c])
    ->rule(ApprovalRule::Quorum)
    ->quorum(2)
    ->create();

// First approver wins:
Requests::make()->requireApprovalsFrom([$a, $b])->rule(ApprovalRule::Any)->create();

// Weighted — a senior approver (ProvidesApprovalWeight) clears the threshold alone:
Requests::make()
    ->requireApprovalsFrom([$senior, $junior])
    ->rule(ApprovalRule::Weighted)
    ->quorum(3)
    ->create();
```

| Rule | Resolves to Approved when |
| --- | --- |
| `ApprovalRule::Unanimous` | Every declared approver has approved. The default. |
| `ApprovalRule::Quorum` | quorum() approvals are in — before every approver has decided. |
| `ApprovalRule::Any` | The first approval arrives. |
| `ApprovalRule::Weighted` | The summed weight of approvals reaches quorum(). Each approver weighs 1 unless it implements ProvidesApprovalWeight. |

## Weighted approvers

For the weighted rule, implement ProvidesApprovalWeight on the actor. The approvable passed in is the request being decided, so the weight can depend on its type or meta:

```php
use Illuminate\Database\Eloquent\Model;
use RoundlyConsulting\Approvals\Interfaces\GivesApprovalsInterface;
use RoundlyConsulting\Approvals\Interfaces\ProvidesApprovalWeight;
use RoundlyConsulting\Approvals\Traits\GivesApprovals;

class User extends Model implements GivesApprovalsInterface, ProvidesApprovalWeight
{
    use GivesApprovals;

    // $approvable is the request being decided — weigh by role, amount, type…
    public function approvalWeight(?Model $approvable = null): int
    {
        return $this->is_director ? 3 : 1;
    }
}
```

With quorum(3), a director weighing 3 clears the threshold alone; three regular approvers weighing 1 each reach it together.

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