PHPackages                             emanate/beem - 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. emanate/beem

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

emanate/beem
============

Refactoring way of sending SMS

v0.7.5(1y ago)64.8k↑30%MITPHPPHP ^8.0

Since Aug 12Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/wao1ook/beem)[ Packagist](https://packagist.org/packages/emanate/beem)[ Docs](https://github.com/wao1ook/beem)[ RSS](/packages/emanate-beem/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (7)Versions (17)Used By (0)

[![](https://camo.githubusercontent.com/c7ccb9d24317b53598ebe8cf2fd2053ae4bf5115c5f20265ef1a873ec2f4912b/68747470733a2f2f6265656d2e6166726963612f77702d636f6e74656e742f75706c6f6164732f323032302f31322f4265656d2d6d656e752d6c6f676f2d30322e737667)](https://camo.githubusercontent.com/c7ccb9d24317b53598ebe8cf2fd2053ae4bf5115c5f20265ef1a873ec2f4912b/68747470733a2f2f6265656d2e6166726963612f77702d636f6e74656e742f75706c6f6164732f323032302f31322f4265656d2d6d656e752d6c6f676f2d30322e737667)

Beem Africa SMS Package for Laravel Applications
================================================

[](#beem-africa-sms-package-for-laravel-applications)

[![Latest Stable Version](https://camo.githubusercontent.com/36393a8151e2c486f4d811b4920f3c52f49fc370d0099ce6d3faa68b7c725e19/68747470733a2f2f706f7365722e707567782e6f72672f656d616e6174652f6265656d2f76)](https://packagist.org/packages/emanate/beem)[![Total Downloads](https://camo.githubusercontent.com/bdfe9fe289b9ca64bf8bfa92ccb8e796ab590efbdbecf3407a9f62e5e8842c7a/68747470733a2f2f706f7365722e707567782e6f72672f656d616e6174652f6265656d2f646f776e6c6f616473)](https://packagist.org/packages/emanate/beem)[![Monthly Downloads](https://camo.githubusercontent.com/7944def9be66c502184b0eabf31ddce5a189d94067ce88a23ca9dfab6550915e/68747470733a2f2f706f7365722e707567782e6f72672f656d616e6174652f6265656d2f642f6d6f6e74686c79)](https://packagist.org/packages/emanate/beem)[![License](https://camo.githubusercontent.com/96890d0d779b0cab549f698acd5b6498cd9da832993b4fdcec00fcefce2f953a/68747470733a2f2f706f7365722e707567782e6f72672f656d616e6174652f6265656d2f6c6963656e7365)](https://packagist.org/packages/emanate/beem)

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

[](#installation)

Install the package via composer:

```
composer require emanate/beem
```

Publish the config file using:

```
php artisan vendor:publish --tag="beem"
```

These are the contents of the published config file:

```
return [
    'api_key' => env('BEEM_SMS_API_KEY', ''),

    'secret_key' => env('BEEM_SMS_SECRET_KEY', ''),

    'sender_name' => env('BEEM_SMS_SENDER_NAME', 'INFO'),

    /*
     * If set to true, the phone addresses will be validated before sending the SMS.
     * This will throw an exception if the phone number is invalid.
     * Set it to false, if you don't want phone addresses validation.
     */
    'validate_phone_addresses' => true,

    /*
    *   Path to the class that handles the Phone Address Validation. Ensure correct mapping of your custom validator class by updating
    *   The 'validator_class' configuration to point to the appropriate namespace and class name.
    *   Please make sure the custom validator class implements the namespace Emanate\BeemSms\Contracts\Validator interface
    */
    'validator_class' => \Emanate\BeemSms\DefaultValidator::class,

    /*
     * Beem Sms Sending SMS URL. You can change this by using a different URL.
     */
    'sending_sms_url' => 'https://apisms.beem.africa/v1/send',
];
```

> It is crucial to double-check and ensure that your config file is kept up to date with the latest settings and configurations.

Usage
-----

[](#usage)

Sending SMS using a Facade

```
use Emanate\BeemSms\Facades\BeemSms;

BeemSms::content('Your message here')->loadRecipients(User::all())->send();
```

or a helper

```
beem()->content('Your message here')->loadRecipients(User::all())->send();
```

Suppose you are using a different name for your column or property for phone numbers on your model or collection while using the loadRecipients() method. In that case, you should explicitly specify it on the method. By default, 'phone\_number' is used.

```
use Emanate\BeemSms\Facades\BeemSms;

BeemSms::content('Your message here')->loadRecipients(User::all(), 'column_name')->send();
```

Instead of passing a collection of phone numbers, you could pass a single phone number in an array or an array of phone numbers.

```
use Emanate\BeemSms\Facades\BeemSms;

BeemSms::content('Your message here')->getRecipients(array('255700000000', '255711111111', '255722222222'))->send();
```

You have a list of phone numbers and it's not a collection or an array, you can unpack them using the unpackRecipients() method.

```
use Emanate\BeemSms\Facades\BeemSms;

BeemSms::content('Your message here')->unpackRecipients('255700000000', '255711111111', '255722222222')->send();
```

You can use custom credentials ( API and Secret Key) on runtime, whenever it suits your needs. Using these methods do not recuse you from the responsibility of adding your credentials to wherever you store your secret environment variables. Please make sure you have your keys registered in the config before you start using the package.

```
use Emanate\BeemSms\Facades\BeemSms;

BeemSms::content('Your message here')
->loadRecipients(User::all(), 'column_name')
->apiKey('your custom api key')
->secretKey('your custom secret key')
->send();
```

### Checking Balance

[](#checking-balance)

To check your Beem SMS balance, you can use the `balance` method provided by the `BeemSms` facade. Here's an example:

```
use Emanate\BeemSms\Facades\BeemSms;

BeemSms::balance();
```

### Validation

[](#validation)

Sometimes phone addresses are not exactly in the format that works for Beem, then the whole operation of sending messages to recipients fails. If you need to validate phone addresses, you need to leave the option **`validate_phone_addresses`** in the config to `true`. This library comes with a default validator that will handle some use-cases. In the occurrence that you need to use your own validator, you can do so by providing the path to your custom class on the **`validator_class`** option that you can find in the config.

> Please make sure that your custom Validator class implements the **`Emanate\BeemSms\Contracts\Validator`** interface.

Testing
-------

[](#testing)

You can run the tests with:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Emanate Software](https://github.com/wao1ook)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance49

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.1% 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 ~70 days

Recently: every ~54 days

Total

15

Last Release

439d ago

### Community

Maintainers

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

---

Top Contributors

[![LogicSatinn](https://avatars.githubusercontent.com/u/69092766?v=4)](https://github.com/LogicSatinn "LogicSatinn (80 commits)")[![JemCdo](https://avatars.githubusercontent.com/u/40404495?v=4)](https://github.com/JemCdo "JemCdo (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelbeem-smsemanate

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/emanate-beem/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k96](/packages/nativephp-mobile)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

43411.2k](/packages/venturedrake-laravel-crm)[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.

5022.0k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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