SMS gateway for HK accessyou
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
src
README.md
composer.json

README.md

laravel-accessyou

SMS gateway for HK accessyou

Requirements

  • PHP >= 7.0
  • Laravel >= 5.5

Installation

First, install laravel 5.5, and make sure that the database connection settings are correct.

composer require huangdijia/laravel-accessyou

Then run these commands to publish config

php artisan vendor:publish --provider="Huangdijia\Accessyou\AccessyouServiceProvider"

Configurations

// config/accessyou.php
    'account'  => 'your account',
    'password' => 'your password',

Usage

As Facade

use Huangdijia\Accessyou\Facades\Accessyou;

...

if (!Accessyou::send('mobile', 'some message')) {
    echo Accessyou::getError();
    echo Accessyou::getErrno();
} else {
    echo "send success";
}

As Command

php artisan accessyou:send 'mobile' 'some message'
# send success
# or
# error

As Helper

if (!accessyou()->send('mobile', 'some message')) {
    echo accessyou()->getError();
    echo accessyou()->getErrno();
} else {
    echo "send success";
}
if (!$error = accessyou_send('mobile', 'some message')) {
    echo $error;
} else {
    echo "send success";
}

Other

License

laravel-ipip is licensed under The MIT License (MIT).