PHPackages                             maat/waffarha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. maat/waffarha

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

maat/waffarha
=============

integrate Waffarha with Maat

v1.1.2(1mo ago)06MITPHPPHP ^8.2

Since May 22Pushed 1mo agoCompare

[ Source](https://github.com/bendaryy/waffarha)[ Packagist](https://packagist.org/packages/maat/waffarha)[ RSS](/packages/maat-waffarha/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (7)Versions (9)Used By (0)

Waffarha Laravel Package
========================

[](#waffarha-laravel-package)

A Laravel package providing a typed HTTP client and facade for integrating with the Maat API from an external application (e.g. Waffarha). It handles OAuth token management automatically and returns typed DTOs instead of raw arrays.

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Laravel `11.x` / `12.x` / `13.x`

Installation
------------

[](#installation)

```
composer require maat/waffarha
```

The service provider and `Waffarha` facade are auto-discovered.

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=waffarha-config
```

Set these in your `.env`:

```
MAAT_URL=https://your-maat-host.example.com/waffarha
MAAT_CLIENT_ID=your-client-id
MAAT_CLIENT_SECRET=your-client-secret
```

> `MAAT_URL` must include the API path prefix (e.g. `/waffarha`) — the SDK appends endpoint paths directly.

See [docs/configuration.md](docs/configuration.md) for all options. Authentication (token fetch, caching, refresh) is fully automatic — see [docs/authentication.md](docs/authentication.md).

Quick start
-----------

[](#quick-start)

```
use Maat\Waffarha\Facades\Waffarha;

// List units (returns a typed UnitCollection of Unit objects)
$units = Waffarha::units()->list(['page' => 1, 'per_page' => 20]);

foreach ($units as $unit) {
    echo $unit->uuid, ' ', $unit->title, ' (', $unit->city, ')', PHP_EOL;
}

$total = $units->meta?->total;

// Fetch one unit's full details (returns a typed UnitDetail)
$detail = Waffarha::units()->get($unit->uuid);
echo $detail->property->title, ' — ', $detail->property->currency;
```

You can also resolve the client via dependency injection (`WaffarhaClient $waffarha`) or the container (`app('waffarha')`).

Documentation
-------------

[](#documentation)

DocContents[Configuration](docs/configuration.md)All config keys and env variables[Authentication](docs/authentication.md)How tokens are obtained/cached/refreshed; token endpoint reference[`POST /oauth/token`](docs/authentication.md#token-endpoint)Get / refresh an access token (`client_credentials` + `refresh_token` grants). The SDK calls this for you — direct use is for non-PHP partners[`units()->list()`](docs/get-units.md)List units — params, response, return type[`units()->get()`](docs/get-unit.md)Unit details — response shape, full field reference[`units()->calendar()`](docs/unit-calendar.md)Per-day pricing + availability calendar (180-day window, hard cap)[`units()->checkAvailability()`](docs/check-availability.md)Confirm a date range + price breakdown before creating a booking[`bookings()->list()`](docs/list-bookings.md)List bookings — filters, response, return type[`bookings()->get()`](docs/get-booking.md)Booking details by UUID[`bookings()->create()`](docs/create-booking.md)Create a booking — payload reference[`payouts()->list()`](docs/payouts.md#list)List per-booking payouts (returns `PayoutCollection`)[`payouts()->get()`](docs/payouts.md#get)Payout details by UUID (returns `Payout`)[`payouts()->submitProof()`](docs/payouts.md#submitproof)Upload the bank-transfer receipt for an open payout[Webhooks](docs/webhooks.md)Outbound booking webhooks (Maat → Waffarha)[Custom requests](docs/custom-requests.md)The generic `request()` escape hatch[Data objects](docs/data-objects.md)Field reference for every returned DTO[Error handling](docs/error-handling.md)Exception types and handling[Testing](docs/testing.md)Running the mocked and live test suitesDevelopment
-----------

[](#development)

```
composer install
composer test       # mocked suite (no network) — run by CI
composer analyse    # PHPStan (level max)
composer format     # Laravel Pint
```

See [docs/testing.md](docs/testing.md) for the live integration suite.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance92

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

7

Last Release

40d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8757985?v=4)[美式少冰](/maintainers/bendary)[@bendary](https://github.com/bendary)

---

Top Contributors

[![bendaryy](https://avatars.githubusercontent.com/u/50684356?v=4)](https://github.com/bendaryy "bendaryy (25 commits)")[![iMustafa](https://avatars.githubusercontent.com/u/23561973?v=4)](https://github.com/iMustafa "iMustafa (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/maat-waffarha/health.svg)

```
[![Health](https://phpackages.com/badges/maat-waffarha/health.svg)](https://phpackages.com/packages/maat-waffarha)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
