huangdijia / laravel-accessyou
accessyou for laravel
1.2.0
2020-10-10 03:17 UTC
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ^6.5|^7.0
- illuminate/console: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
README
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-access is licensed under The MIT License (MIT).