huangdijia/laravel-smspro

1.1.0 2019-09-20 08:48 UTC

This package is auto-updated.

Last update: 2024-11-05 18:34:04 UTC


README

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());
}