tzk/sendinblue

SendInBlue API PHP类(由SendInBlue提供)的Laravel 5(和Laravel 4)包装器

v2.0.1 2020-12-15 10:53 UTC

This package is auto-updated.

Last update: 2024-09-15 19:17:23 UTC


README

该软件包支持与Laravel框架 v4.x或v5.x一起使用,提供SendinblueWrapper门面。

###安装

为了安装

composer require tzk/sendinblue

在Laravel中,找到文件..config/app.php。将以下内容添加到providers数组中

'providers' => array(
    …
    'Vansteen\Sendinblue\SendinblueServiceProvider',
    …
),

此外,将以下内容添加到aliases数组中

'aliases' => array(
    …
    'SendinblueWrapper' => 'Vansteen\Sendinblue\Facades\SendinBlueWrapper',
    …
),

运行命令composer update

发布配置

// Laravel v4.x
$ php artisan config:publish vansteen/sendinblue

// Laravel v5.x
$ php artisan vendor:publish

###使用

您的唯一Sendinblue API密钥应设置为软件包的配置文件中的设置,位于app/config/packages/vansteen/sendinblue/config.php(Laravel 4)或config/sendinblue.php(Laravel 5)。

Sendinblue API类的方法按照Sendinblue API文档中的描述工作,文档可在此处找到。感谢Laravel使用“门面”设计模式,所有方法都可以以下方式调用

…
// Retrieve your account info
$account = SendinblueWrapper::get_account();
…