New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

huangdijia/laravel-sms

sms for laravel
7,402 2
Install
composer require huangdijia/laravel-sms
Latest Version:1.1.7
PHP:>=7.2.0
Laravel:7 · 8
License:MIT
Last Updated:Nov 24, 2020
Links: GitHub  ·  Packagist
Maintainer: huangdijia

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

Related Packages

ohanspace/sms

this is a sms package made for laravel

11 0
sms
midnite81/laravel-base

Base Functionality for Laravel

35,582 3
lbhurtado/sms

Driver-based SMS component in Laravel inspired by the tutorial of Orobo Lucky

9,485 0
alhaji-aki/laravel-sms

A package that allows developers integrate sms providers and provide a common ap...

5,952 2
linkstreet/laravel-sms

Package to support multi SMS gateway providers

4,290 3

Version History

Version Released PHP Laravel License
1.1.7 >=7.2.0 ^7.0|^8.0 MIT
1.1.6 >=7.2.0 ^7.0|^8.0 MIT
1.1.5 >=7.2.0 ^7.0|^8.0 MIT
1.1.4 >=7.2.0 ^7.0|^8.0 MIT
1.1.3 >=7.2.0 ^7.0|^8.0 MIT