divineomega/sms-providers

Provides data on popular SMS providers

v1.0.0 2019-05-07 22:14 UTC

This package is auto-updated.

Last update: 2024-10-08 09:57:43 UTC


README

This library provides data on popular SMS providers.

Installation

To install the SMS Providers package, simply run the following Composer command from the root of your project.

composer require divineomega/sms-providers

Usage

Get providers by destination country

You can retrieve all the providers that deliver SMS to specific countries. See the following code for an example.

$country = (new Countries())->getByName('United Kingdom');
$providers = (new Providers())->getByDestinationCountry($country);

This code will retrieve an array of all the providers that support sending text messages to phone numbers starting with the '44' calling code (United Kingdom).

Get providers by calling code

You can retrieve all the providers that deliver SMS to numbers beginning with a specific calling code. See the following example snippet.

$providers = (new Providers())->getByDestinationCallingCode('44');

This code will retrieve an array of all the providers that support sending text messages to phone numbers starting with the '44' calling code (United Kingdom).