PHPackages                             mix-code/wafeq - 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. [API Development](/categories/api)
4. /
5. mix-code/wafeq

ActiveLibrary[API Development](/categories/api)

mix-code/wafeq
==============

Simple implementation for Wafeq API

v1.5.0(1y ago)129MITPHPPHP ^8.2CI failing

Since Apr 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mix-code/wafeq)[ Packagist](https://packagist.org/packages/mix-code/wafeq)[ Docs](https://github.com/mix-code/wafeq)[ RSS](/packages/mix-code-wafeq/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

Wafeq Integration for Laravel
=============================

[](#wafeq-integration-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dc12d9a2e446a765dbcef77bf280d1b7a7a81d5b501b1ce7807294c3010a7e74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69782d636f64652f77616665712e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mix-code/wafeq)[![Total Downloads](https://camo.githubusercontent.com/9473c2129ac5ce4f0a2b18f03bd8fe9fd10ab4d65ad76003ec85f8c2d056ce89/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69782d636f64652f77616665712e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mix-code/wafeq)[![GitHub Actions](https://github.com/mix-code/wafeq/actions/workflows/main.yml/badge.svg)](https://github.com/mix-code/wafeq/actions/workflows/main.yml/badge.svg)

A Laravel package for interacting with the Wafeq API, supporting **projects, contacts, accounts, manual journals, invoices**.

🚀 Features
----------

[](#-features)

- Manage **projects** (list, show, create, update, delete)
- Manage **contacts** (list, show, create, update, delete)
- Manage **accounts** (list)
- Manage **manual journal** (create)
- Manage **invoice** (create)
- **Simple API wrapper** with Laravel's HTTP Client
- Supports **facade usage** for convenience

‼️ Requirments
--------------

[](#️-requirments)

- PHP 8.2
- Laravel 10 or Above

📦 Installation
--------------

[](#-installation)

```
composer require mix-code/wafeq
```

⚙️ Configuration
----------------

[](#️-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=wafeq
```

To enable the package, add the following to your `.env` file:

```
WAFEQ_IS_ENABLED=true
```

And update your `.env` file:

```
WAFEQ_API_KEY=your_api_key_here
WAFEQ_ENDPOINT=https://api.wafeq.com/v1
```

🛠️ Usage
--------

[](#️-usage)

### 1️⃣ Project Directly

[](#1️⃣-project-directly)

You can inject `Project` directly anywhere:

```
use MixCode\Wafeq\Project;

class ProjectController
{

    public function listProjects()
    {
        $projectService = new Project();

        return $projectService->list();
    }
}
```

### 2️⃣ Using the Facade

[](#2️⃣-using-the-facade)

You can also use the `Project` facade:

```
use MixCode\Wafeq\ProjectFacade as Project;

$projects = Project::list();
```

### 3️⃣ Using Dependency Injection

[](#3️⃣-using-dependency-injection)

You can inject `Project` directly into your controllers or services:

```
use MixCode\Wafeq\Project;

class ProjectController
{
    public function __construct(private Project $project) {}

    public function listProjects()
    {
        return $this->project->list();
    }
}
```

📚 API Methods
-------------

[](#-api-methods)

### 🔹 Projects Use `Project.php` class, in namespace `MixCode\Wafeq\Project`

[](#-projects-use-projectphp-class-in-namespace-mixcodewafeqproject)

#### List Projects

[](#list-projects)

```
$project = new Project();
$projects = $project->list();
```

#### Show Project

[](#show-project)

```
$project = new Project();
$project = $project->show($projectId);
```

#### Create Project

[](#create-project)

```
use MixCode\Wafeq\Payloads\ProjectPayload;

$payload = new ProjectPayload(
    name: 'Project Name',
);

$project = new Project();

$response = $project->create($payload);
```

#### update Project

[](#update-project)

```
use MixCode\Wafeq\Payloads\ProjectPayload;

$payload = new ProjectPayload(
    name: 'John Doe',
);

$project = new Project();

$response = $project->update($payload);
```

#### Delete Project

[](#delete-project)

```
$project = new Project();

$response = $project->delete($projectId);
```

### 🔹 Contacts Use `Contact.php` class, in namespace `MixCode\Wafeq\Contact`

[](#-contacts-use-contactphp-class-in-namespace-mixcodewafeqcontact)

#### List Contacts

[](#list-contacts)

```
$contact = new Contact();
$contacts = $contact->list();
```

#### Show Contact

[](#show-contact)

```
$contact = new Contact();
$contact = $contact->show($contactId);
```

#### Create Contact

[](#create-contact)

```
use MixCode\Wafeq\Payloads\ContactPayload;

$payload = new ContactPayload(
    name: 'Contact Name',
    email: 'contact@example.com',
    phone: '+1234567890'
);

$contact = new Contact();
$response = $contact->create($payload);
```

#### Update Contact

[](#update-contact)

```
use MixCode\Wafeq\Payloads\ContactPayload;

$payload = new ContactPayload(
    name: 'Contact Name Updated',
    email: 'contact@example.com',
    phone: '+1234567890'
);

$contact = new Contact();
$response = $contact->update($payload);
```

#### Delete Contact

[](#delete-contact)

```
$contact = new Contact();
$contact = $contact->delete($contactId);
```

### 🔹 manual journal Use `ManualJournal.php` class, in namespace `MixCode\Wafeq\ManualJournal`

[](#-manual-journal-use-manualjournalphp-class-in-namespace-mixcodewafeqmanualjournal)

#### Create Manual Journal

[](#create-manual-journal)

```
// 1. Build Line Items
$lineItem1 = new ManualJournalLineItemPayload(
    account: 'acc_123',
    amount: 1000,
    amountToBcy: 1000,
    currency: 'AED',
    description: 'Sales Revenue',
    branch: 'main',
);

$lineItem2 = new ManualJournalLineItemPayload(
    account: 'acc_456',
    amount: -1000,
    amountToBcy: -1000,
    currency: 'AED',
    description: 'Cash Payment',
    branch: 'main',
);

// 2. Build the main payload
$manualJournalPayload = new ManualJournalPayload(
    date: '2025-04-25',
    lineItems: [$lineItem1, $lineItem2],
    reference: 'REF-001',
    notes: 'Payment for invoice #001',
);

// 3. Create the manual journal
$manualJournalService = new ManualJournal();
$response = $manualJournalService->create($manualJournalPayload);
```

### 🔹 Accounts Use `Account.php` class, in namespace `MixCode\Wafeq\Account`

[](#-accounts-use-accountphp-class-in-namespace-mixcodewafeqaccount)

#### List Accounts

[](#list-accounts)

```
$account = new Account();
$accounts = $account->list();
```

✅ Testing
---------

[](#-testing)

```
vendor/bin/pest
```

📜 License
---------

[](#-license)

This package is open-source and available under the [MIT License](LICENSE).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance46

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~6 days

Total

6

Last Release

400d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10d476babd579e5a75399ebb785e0b1c25ad2dc9ae7b58f2242e8a87f4a4ac5e?d=identicon)[mix-code](/maintainers/mix-code)

![](https://www.gravatar.com/avatar/3a0404cdcda53149860dcace4c8eb967df61563f41af0bd150f4bbedfeb1e559?d=identicon)[Mohamed-Ghareeb](/maintainers/Mohamed-Ghareeb)

---

Top Contributors

[![moaalaa](https://avatars.githubusercontent.com/u/22417282?v=4)](https://github.com/moaalaa "moaalaa (9 commits)")[![m7ghareeb](https://avatars.githubusercontent.com/u/32992831?v=4)](https://github.com/m7ghareeb "m7ghareeb (7 commits)")[![Mohamed-Ghareeb](https://avatars.githubusercontent.com/u/32992831?v=4)](https://github.com/Mohamed-Ghareeb "Mohamed-Ghareeb (7 commits)")

---

Tags

mix-codemixcodewafeqwafeq-clientwafeq-api

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mix-code-wafeq/health.svg)

```
[![Health](https://phpackages.com/badges/mix-code-wafeq/health.svg)](https://phpackages.com/packages/mix-code-wafeq)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rapidez/core

Rapidez Core

1823.5k72](/packages/rapidez-core)

PHPackages © 2026

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