Download the PHP package emanate/beem without Composer
On this page you can find all versions of the php package emanate/beem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package beem
Short Description Refactoring way of sending SMS
License MIT
Homepage https://github.com/wao1ook/beem
Informations about the package beem
Beem Africa SMS Package for Laravel Applications
Installation
Install the package via composer:
Publish the config file using:
These are the contents of the published config file:
It is crucial to double-check and ensure that your config file is kept up to date with the latest settings and configurations.
Usage
Sending SMS using a Facade
or a helper
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.
Instead of passing a collection of phone numbers, you could pass a single phone number in an array or an array of phone numbers.
You have a list of phone numbers and it's not a collection or an array, you can unpack them using the unpackRecipients() method.
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.
Checking Balance
To check your Beem SMS balance, you can use the balance
method provided by the BeemSms
facade. Here's an example:
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
You can run the tests with:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Emanate Software
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of beem with dependencies
ext-curl Version *
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0