huangdijia/laravel-smspro

1.1.0 2019-09-20 08:48 UTC

This package is auto-updated.

Last update: 2024-07-05 17:50:38 UTC


README

SMS gateway for smspro

Latest Stable Version Total Downloads

Requirements

  • PHP >= 7.0
  • Laravel >= 5.5

Installation

composer require huangdijia/laravel-smspro

Publish

php artisan vendor:publish --provider="Huangdijia\Smspro\SmsproServiceProvider"

Configure

SMSPRO_USERNAME=account
SMSPRO_PASSWORD=password
SMSPRO_SENDER=sender

Usage

Command

php artisan smspro:send [mobile] [message]

Facade

Huangdijia\Smspro\Facades\Smspro::send($mobile, $message);

Container

app('sms.smspro')->send($mobile, $message);

Error

$smspro = app('sms.smspro');

if (!$smspro->send($mobile, $message)) {
    dd($smspro->getError());
}