PHPackages                             ahmedtaha-dev/fourjawaly-package - 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. ahmedtaha-dev/fourjawaly-package

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

ahmedtaha-dev/fourjawaly-package
================================

A Laravel package for managing fourjawaly services.

v1.0.1(2mo ago)08MITPHP

Since May 1Pushed 2mo agoCompare

[ Source](https://github.com/ahmedtaha01/4jawaly-package)[ Packagist](https://packagist.org/packages/ahmedtaha-dev/fourjawaly-package)[ RSS](/packages/ahmedtaha-dev-fourjawaly-package/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

FourJawaly (4jawaly) Laravel package
====================================

[](#fourjawaly-4jawaly-laravel-package)

Send SMS through [4jawaly](https://4jawaly.com/) from a Laravel application. This package wraps the JSON API using Laravel’s HTTP client and your account credentials.

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

[](#requirements)

- PHP 8.1+ (same as supported Laravel versions)
- Laravel 10, 11, or 12
- A 4jawaly account with API key, API secret, and an approved sender name

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

[](#installation)

Install with Composer (adjust the constraint to match your setup):

```
composer require ahmedtaha/fourjawaly-package
```

If you are developing the package locally, add a path repository in your app’s `composer.json`, then require it as usual.

Register the service provider
-----------------------------

[](#register-the-service-provider)

The package does not rely on Composer auto-discovery yet. Register the provider manually.

**Laravel 11+** — add to `bootstrap/providers.php`:

```
AhmedTaha\FourjawalyPackage\FourJawalyServiceProvider::class,
```

**Laravel 10** — add to the `providers` array in `config/app.php`:

```
AhmedTaha\FourjawalyPackage\FourJawalyServiceProvider::class,
```

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

[](#configuration)

Publish the config file:

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

Set these variables in `.env` (names match `config/fourjawaly.php`):

```
FOURJAWALY_API_KEY=your_api_key
FOURJAWALY_API_SECRET=your_api_secret
FOURJAWALY_SENDER_NAME=your_registered_sender
```

`FOURJAWALY_API_KEY` and `FOURJAWALY_API_SECRET` are sent as HTTP Basic credentials (`base64(key:secret)`) to the 4jawaly API, consistent with their documentation.

Usage
-----

[](#usage)

### Send a message

[](#send-a-message)

Use `FourJawalyFacade` to send SMS:

```
use AhmedTaha\FourjawalyPackage\Facades\FourJawalyFacade;

$result = FourJawalyFacade::send(
    ['9665XXXXXXXX', '9665YYYYYYYY'],
    'Your message text here.'
);
```

`send` returns the decoded JSON array from the API on success.

On failure it throws `AhmedTaha\FourjawalyPackage\Exceptions\FourJawalyException` (non-2xx responses and transport errors are wrapped).

```
use AhmedTaha\FourjawalyPackage\Exceptions\FourJawalyException;
use AhmedTaha\FourjawalyPackage\Facades\FourJawalyFacade;

try {
    FourJawalyFacade::send(['9665XXXXXXXX'], 'Hello');
} catch (FourJawalyException $e) {
    // Log or handle $e->getMessage()
}
```

`FourJawalyFacade::send()` validates input with `AhmedTaha\FourjawalyPackage\Validation\FourJawalyValidation` before calling the API: at least one phone number, each number a string using the `966` prefix with nine digits after it (no leading `+`), and a non-empty message. Validation failures throw `FourJawalyException`. You can call `FourJawalyValidation::validate($phones, $message)` yourself if you need the same checks outside `send()`.

API endpoint
------------

[](#api-endpoint)

The client posts to:

`https://api-sms.4jawaly.com/api/v1/account/area/sms/send`

The package sends a JSON body with a `messages` array (`text`, `numbers`, and `sender`).

License
-------

[](#license)

This package is licensed under the [MIT License](https://opensource.org/licenses/MIT)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance85

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

4

Last Release

80d ago

Major Versions

0.2.0 → 1.0.02026-05-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/98897680?v=4)[ahmedtaha01](/maintainers/ahmedtaha01)[@ahmedtaha01](https://github.com/ahmedtaha01)

---

Top Contributors

[![ahmedtaha01](https://avatars.githubusercontent.com/u/98897680?v=4)](https://github.com/ahmedtaha01 "ahmedtaha01 (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ahmedtaha-dev-fourjawaly-package/health.svg)

```
[![Health](https://phpackages.com/badges/ahmedtaha-dev-fourjawaly-package/health.svg)](https://phpackages.com/packages/ahmedtaha-dev-fourjawaly-package)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-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)
