pangpondpon/laravel-lb
Composer 安装命令:
composer require pangpondpon/laravel-lb
包简介
Library that let you connect your laravel application to Logicboxes with ease
README 文档
README
This library let your laravel application talk with Logicboxes API with ease.
How to install
- Run
composer require pangpondpon/laravel-lbto include this library to your project - Add
LaravelLb\LaravelLbServiceProvider::classinto your providers array in config/app.php - Run
php artisan vendor:publishto publish the config file - Put your credential in config/logicboxes.php like so
<?php return [ "test_mode" => env('LB_TEST_MODE', true), "auth_userid" => env('LB_AUTH_USERID', 'YOUR_USER_ID'), "api_key" => env('LB_API_KEY', 'YOUR_API_KEY'), ];
How to use in Laravel Controller
Use case - Buy an ssl from comodo
<?php namespace App\Http\Controllers; use App\Http\Requests; use Illuminate\Http\Request; use LaravelLb\LogicBoxesComodo; class ComodoCertController extends Controller { public $comodo; public function __construct() { $this->comodo = new LogicBoxesComodo(); } // Buy the ssl from comodo, see LogicBoxesComodo class for api call info public function buy() { // Order buy use method add from LogicBoxesComodo class $response = $this->comodo->add([ "domain-name" => "ssldemosite.com", "months" => 12, "customer-id" => "52213365", "plan-id" => LogicBoxesComodo::POSITIVE_SSL, // Check more options in LogicBoxesComodo "invoice-option" => LogicBoxesComodo::NO_INVOICE // Check more options in LogicBoxesComodo ])->toArray(); return $response; } }
See more example in /example folder.
统计信息
- 总下载量: 289
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-08-26