Skip to content

huangdijia/laravel-twsms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMS gateway for twsms

Latest Stable Version Total Downloads

Requirements

  • PHP >= 7.0
  • Laravel >= 5.5

Installation

composer require huangdijia/laravel-twsms

Publish

php artisan vendor:publish --provider="Huangdijia\Twsms\Providers\TwsmsServiceProvider"

Configure

TWSMS_ACCOUNT=account
TWSMS_PASSWORD=password
TWSMS_TYPE=now
TWSMS_ENCODING=big5
TWSMS_VLDTIME=
TWSMS_DLVTIME=

Usage

Command

php artisan twsms:send [mobile] [message]

Facade

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

Container

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

Error

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

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

About

twsms for laravel

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages