wensleydale/sendpulse-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

wensleydale/sendpulse-laravel

最新稳定版本:v1.0.1

Composer 安装命令:

composer require wensleydale/sendpulse-laravel

包简介

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

README 文档

README

A service provider and facade to set up and use the SendPulse PHP library in Laravel 5.

Build Status

This package consists of a service provider, which binds an instance of an initialized SendPulse client to the IoC-container and a SendPulse facade so you may access all methods of the SendpulseApi class via the syntax:

$message = ['title' => 'My first notification', 'website_id' => 1, 'body' => 'I am the body of the push message'];

SendPulse::createPushTask($message);

You should refer to the SendPulse API and underlying SendPush PHP class for full details about all available methods.

Setup

  1. Install the 'wensleydale/sendpulse-laravel' package

    Note, this will also install the required wensleydale/sendpulse-rest-api-php package.

    $ composer require wensleydale/sendpulse-laravel:1.*
  2. Update 'config/app.php'

    # Add `SendPulseLaravelServiceProvider` to the `providers` array
    'providers' => array(
        ...
        'SendPulse\SendPulseLaravel\SendPulseLaravelServiceProvider',
    )
    
    # Add the `SendPushFacade` to the `aliases` array
    'aliases' => array(
        ...
        'SendPulse' => 'SendPulse\SendPulseLaravel\SendPulseFacade',
    )
  3. Publish the configuration file (creates sendpulse.php in config directory) and add your API keys and optional default settings.

    $ php artisan vendor:publish

Type Hinting

If you do not wish to make use of the SendPulse facade you may simply "type-hint" the SendPulse dependency in the constructor of a class that is resolved by the IoC container and an instantiated client will be ready for use.

use SendPulse\SendpulseApi;

private $client;

public function __construct(SendpulseApi $client)
{
    $this->client = $client;
}

public function getWebsites()
{
	$this->client->pushListWebsites();
}

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固