Looking to hire Laravel developers? Try LaraJobs

laravel-mitake maintained by huangdijia

Description
mitake for laravel
Author
Last update
2020/03/05 07:44 (dev-master)
License
Downloads
95
Tags

Comments
comments powered by Disqus

SMS gateway for mitake

Latest Stable Version Total Downloads

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-mitake

Then run these commands to publish config

php artisan vendor:publish --provider="Huangdijia\Mitake\MitakeServiceProvider"

Configurations

// config/mitake.php
    'username' => 'your account',
    'password' => 'your password',

Usage

As Facade

use Huangdijia\Mitake\Facades\Mitake;

...

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

As Command

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

As Helper

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

Other

License

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