minchao/mitake-laravel
Composer 安装命令:
composer require minchao/mitake-laravel
包简介
Laravel Package for Mitake's PHP SDK
README 文档
README
This is a simple Laravel service provider for making it easy to access the Mitake PHP SDK in your Laravel and Lumen applications.
Installation
The Mitake service provider can be installed via Composer.
composer require minchao/mitake-laravel
To use the Mitake service provider, you must register the provider when bootstrapping your application.
Laravel
Laravel 5.5 and above
The package will automatically register provider and facade.
Laravel 5.4 and below
Add Mitake\Laravel\MitakeServiceProvider to the providers section of your config/app.php:
'providers' => [ // ... Mitake\Laravel\MitakeServiceProvider::class, ];
Add Mitake facade to the aliases section of your config/app.php:
'aliases' => [ // ... 'Mitake' => Mitake\Laravel\Facade\Mitake::class, ];
Or use the facade class directly:
use Mitake\Laravel\Facade\Mitake;
Lumen
Register the Mitake\Laravel\MitakeServiceProvider in your bootstrap/app.php:
$app->register(Mitake\Laravel\MitakeServiceProvider::class);
Copy the mitake.php config file in to your project:
mkdir config
cp vendor/minchao/mitake-laravel/config/mitake.php config/mitake.php
Configuration
Publish the package configuration using Artisan (Lumen doesn't support).
php artisan vendor:publish --provider="Mitake\Laravel\MitakeServiceProvider"
Then update config/mitake.php with your credentials. Alternatively, you can update your .env file.
MITAKE_USERNAME=username
MITAKE_PASSWORD=password
Usage
To use the Mitake SDK within your app, you need to retrieve it from the service container:
$mitake = app(\Mitake\Client::class); $message = (new \Mitake\Message\Message()) ->setDstaddr('0987654321') ->setSmbody('Hello, Laravel IoC Container'); $result = $mitake->send($message);
Or, you can use the Mitake facade:
$message = (new \Mitake\Message\Message()) ->setDstaddr('0987654321') ->setSmbody('Hello, Facade'); $result = Mitake::send($message);
License
See the LICENSE file for license rights and limitations (BSD 3-Clause).
minchao/mitake-laravel 适用场景与选型建议
minchao/mitake-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 719 次下载、GitHub Stars 达 4, 最近一次更新时间为 2018 年 02 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel-service-provider」 「mitake」 「mitake-service-provider」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 minchao/mitake-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 minchao/mitake-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 minchao/mitake-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Package for EVERY8D's PHP SDK
A Mitake SMS SDK for PHP (Unofficial)
A PHP client for the Mitake (三竹簡訊) SMS HTTP API.
A Mitake SMS SDK for PHP (Unofficial)
Mitake service provider for Laravel
mitake for laravel
统计信息
- 总下载量: 719
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-02-08