定制 ramonvic/l4-pusher 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ramonvic/l4-pusher

Composer 安装命令:

composer require ramonvic/l4-pusher

包简介

Pusher.com service provider for Laravel 4, ith all settings configurable

README 文档

README

Build Status Latest Version License

L4Pusher is a Pusher bridge for Laravel 4 using the official Pusher package.

Pusher (Documentation) is a simple hosted API for adding realtime bi-directional functionality via WebSockets to web and mobile apps, or any other Internet connected device.

// Triggering events.
Pusher::trigger('my-channel', 'my_event', 'hello world');

// Get active channels
Pusher::get('/channels');

Installation

Require this package, with Composer, in the root directory of your project.

composer require ramonvic/l4-pusher

Add the service provider to config/app.php in the providers array.

'Ramonvic\L4Pusher\PusherServiceProvider'

If you want you can use the facade. Add the reference in config/app.php to your aliases array.

'L4Pusher' => 'Ramonvic\L4Pusher\Facades\Pusher'

Looking for a Laravel 5 compatible version?

Please use @vinkla's Laravel Pusher package instead.

Configuration

L4Pusher requires configuration. To get started, you'll need to publish all vendor assets:

php artisan config:publish ramonvic/l4-pusher

This will create a config/packages/ramonvic/l4-pusher/config.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

Usage

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is main. After you enter your authentication details in the config file, it will just work:

// You can alias this in config/app.php.
use Ramonvic\L4Pusher\Facades\Pusher;

Pusher::trigger('my-channel', 'my-event', ['message' => $message]);
// We're done here - how easy was that, it just works!

Documentation

There are other classes in this package that are not documented here. This is because the package is a Laravel wrapper of the official Pusher package.

License

L4Pusher is licensed under The MIT License (MIT).

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-02