LaravelPackages.net
Acme Inc.
Toggle sidebar
huangdijia/laravel-sms

sms for laravel

6.995
2
1.1.7
About huangdijia/laravel-sms

huangdijia/laravel-sms is a Laravel package for sms for laravel. It currently has 2 GitHub stars and 6.995 downloads on Packagist (latest version 1.1.7). Install it with composer require huangdijia/laravel-sms. Discover more Laravel packages by huangdijia or browse all Laravel packages to compare alternatives.

Last updated

Laravel-sms

Latest Stable Version Total Downloads GitHub license

Installation

Install package

composer require huangdijia/laravel-sms

Install configure

php artisan sms:install

Uage

Simple to send a message

use Huangdijia\Sms\Facades\Sms;

Sms::to('phone number')->content('message content')->send();

Check send result

$response = Sms::to('phone number')->content('message content')->send();

if ($response->successful()) {
    // success
}

Throwing Exceptions

$response = Sms::to('phone number')->content('message content')->send();

$response->throw();

Switch sms factory

Sms::use('another')->to('phone number')->content('message content')->send();

With Validate Rules

Sms::withRules([
    'to'      => 'required|numeric|....',
    'content' => 'required|...',
], [
    'to.required'      => ':attribute cannot be empty!',
    'content.required' => ':attribute cannot be empty!',
    // more messages
])->to()->content()->send();

Star History Chart