承接 danvuquoc/laravel-kraken 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

danvuquoc/laravel-kraken

最新稳定版本:v1.2.2

Composer 安装命令:

composer require danvuquoc/laravel-kraken

包简介

A minimal service provider to set up and use the Kraken API PHP library in Laravel 5

README 文档

README

A composer package for the Kraken PHP API which supports the Laravel 5 framework.

Composer Installation

The best way to install laravel-kraken is with Composer.

To install the most recent version, run the following command.

$ php composer.phar require danvuquoc/laravel-kraken

Alternatively, you may edit your composer.son directly by adding the following to the require section.

"require": {
    "danvuquoc/laravel-kraken": "1.*",
}

Integration in Laravel

Publish Configuration File

Running the following command will publish config/kraken.php to your config folder. In this file you will need to insert your api key and api secret.

$ php artisan vendor:publish —provider="Danvuquoc\Kraken\KrakenServiceProvider"

Providers

This is only applicable to versions prior to Laravel 5.5, Automatic Package Discovery is enabled for Laravel 5.5 and above.

Register the service provider in config/app.php by inserting it into the providers array:

'providers' => [
    ...
    Danvuquoc\Kraken\KrakenServiceProvider::class,
    ...
]

Facade

This is only applicable to versions prior to Laravel 5.5, Automatic Package Discovery is enabled for Laravel 5.5 and above.

Register the facade in config/app.php by inserting it into the aliases array:

'aliases' => [
    ...
    'KrakenIO' => Danvuquoc\Kraken\KrakenFacade::class,
    ...
]

Usage

Be sure to use KrakenIO; in your code

Then you can simply:

$response = KrakenIO::url([
    'url' => 'http://url-to-image.com/file.jpg',
    'wait' => true,
]);

Full documentation on the Kraken PHP Api is available on their Kraken PHP API Github Repo.

统计信息

  • 总下载量: 43.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 4
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-06