PHPackages                             tomsgad/laravel-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. [API Development](/categories/api)
4. /
5. tomsgad/laravel-beem

Abandoned → [https://github.com/mg-techlegend/laravel-beem-africa.git](/?search=https%3A%2F%2Fgithub.com%2Fmg-techlegend%2Flaravel-beem-africa.git)Library[API Development](/categories/api)

tomsgad/laravel-beem
====================

Awesomeness of Laravel merged with Beem flawless API to reap the magic!

1.1.1(2y ago)34302[1 PRs](https://github.com/tomsgad/laravel-beem/pulls)MITPHPPHP ^8.1

Since May 10Pushed 1y ago1 watchersCompare

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

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

Laravel Beem
============

[](#laravel-beem)

Effortless Beem integrations with Laravel
-----------------------------------------

[](#effortless-beem-integrations-with-laravel)

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

 [![Latest Version on Packagist](https://camo.githubusercontent.com/ea998ade039a3db00d1be29077dc35b1fdc8b7bb21d8e47c5e4ea88c113f9530/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6d736761642f6c61726176656c2d6265656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tomsgad/laravel-beem) [![Github Test Action Status](https://camo.githubusercontent.com/f1b5ab139c0a9dc6882ad725b0daaa42e7ca6116122d8622fb940518eb14d347/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f6d736761642f6c61726176656c2d6265656d2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/tomsgad/laravel-beem/actions?query=workflow%3Arun-tests+branch%3Amain) [![Github Code Style Action Status](https://camo.githubusercontent.com/5382f4cdefd8e60224d420367258c47ae3a3adf57aacf8e21de041d9f35dba6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f6d736761642f6c61726176656c2d6265656d2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/tomsgad/laravel-beem/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain) [![Total Downloads](https://camo.githubusercontent.com/520dfdef1621e5286c982b3297ec789ea5108aa404b53a8cbb1d5ee3ddd8d46a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6d736761642f6c61726176656c2d6265656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tomsgad/laravel-beem) [![License](https://camo.githubusercontent.com/43a20361413f4783c7e671b64893a8e3e52936eb27f2e93cad0cade527d8f0bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f6d736761642f6c61726176656c2d6265656d)](https://packagist.org/packages/tomsgad/laravel-beem)

This package provides a simple and crisp way to access the Beem API endpoints. Sending [notifications](https://laravel.com/docs/9.x/notifications#sms-notifications) sms the laravel way.

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

[](#installation)

You can install the package via composer:

```
composer require tomsgad/laravel-beem
```

After the package is installed, you can optionally publish the config file.

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

This is the contents of the published config file:

```
return [
    'sms' => [
        /*
        |--------------------------------------------------------------------------
        | Beem SMS API Key
        |--------------------------------------------------------------------------
        |
        | Here we set sms api key that will be used to send the sms. Get your
        | credentials from https://sms.beem.africa/#!/dashboard/profile/authentication
        |
        */
        'api_key' => env('BEEM_SMS_API_KEY', ''),

        /*
        |--------------------------------------------------------------------------
        | Beem SMS Secret Key
        |--------------------------------------------------------------------------
        |
        | Here we set sms secret key that will be used to send the sms. Get your
        | credentials from https://sms.beem.africa/#!/dashboard/profile/authentication
        |
        */
        'secret_key' => env('BEEM_SMS_SECRET_KEY', ''),

        /*
        |--------------------------------------------------------------------------
        | Beem SMS Sender Name
        |--------------------------------------------------------------------------
        |
        | Here we set a sender name that will be used to send the sms. Default
        | sender name is `INFO`. Please only use sender names that have been registered
        | or the sms will not be sent.
        |
        */

        'sender_name' => env('BEEM_SMS_SENDER_NAME', ''),
    ]
];
```

Setting up Beem service
-----------------------

[](#setting-up-beem-service)

You will need to get your api details from your profile. Here are the steps you can follow (Described by [Beem](https://docs.beem.africa/)):

1. Create a free account on .
2. On completing your registration you will get a confirmation email. Click on the link or paste the link into your browser to validate the account.
3. Log into your account with your username &amp; password on .
4. You should have received some free test credits and a default sender ID of ‘INFO’ should be Active.
5. Visit the 'Profile ' tab and click on ‘Authentication Information’.
6. Click generate API Key and Secret to obtain these. Note that the Secret is only displayed once, so please store this safely.
7. Use this API Key and Secret to start sending messages using the API defined below.

Set up your `.env` file with the credentials you go from the procedure above

```
BEEM_SMS_API_KEY=""
BEEM_SMS_SECRET_KEY=""
BEEM_SMS_SENDER_NAME=""
```

Add `routeNotificationForBeem` to your notifiable model and define how to get phone number. **Note**: The method should return an array or a countable. I have let it that way so you can implement it the way you see fit.

```
