Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duxet/laravel-realtime
Laravel realtime communication using publish/subscribe pattern
https://github.com/duxet/laravel-realtime
Last synced: 10 days ago
JSON representation
Laravel realtime communication using publish/subscribe pattern
- Host: GitHub
- URL: https://github.com/duxet/laravel-realtime
- Owner: duxet
- License: mit
- Created: 2015-02-22T23:27:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-01T00:08:47.000Z (over 9 years ago)
- Last Synced: 2024-10-12T06:47:01.081Z (27 days ago)
- Language: PHP
- Homepage:
- Size: 206 KB
- Stars: 9
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-realtime
[![Gitter chat](https://badges.gitter.im/duxet/laravel-realtime.png)](https://gitter.im/duxet/laravel-realtime)
[![Build Status](https://travis-ci.org/duxet/laravel-realtime.svg?branch=master)](https://travis-ci.org/duxet/laravel-realtime)
[![Test Coverage](https://codeclimate.com/github/duxet/laravel-realtime/badges/coverage.svg)](https://codeclimate.com/github/duxet/laravel-realtime)
[![Code Climate](https://codeclimate.com/github/duxet/laravel-realtime/badges/gpa.svg)](https://codeclimate.com/github/duxet/laravel-realtime)
[![Packagist](https://img.shields.io/packagist/dt/duxet/laravel-realtime.svg)](https://packagist.org/packages/duxet/laravel-realtime)Laravel package for realtime communication using publish/subscribe pattern.
# What is that?
Ajax is not cool anymore. Now we have websockets, which gives us realtime communication with minimal delay. But how to use it with Laravel? This package gives answer to this question!# Supported services
* PubNub
* Pusher (only publish method)# How to use it?
```php
Realtime::publish('my_channel', 'Hello world!');
``````php
Realtime::subscribe('my_channel', function($message) {
...
);
```# Installation
Require this package by using following command:```
composer require duxet/laravel-realtime
```After updating composer, add the ServiceProvider to the providers array in `config/app.php`
```php
'duxet\Realtime\RealtimeServiceProvider',
```And if you want, you can add alias to Facade in your 'config/app.php'
```php
'Realtime' => 'duxet\Realtime\Facades\Realtime',
```# License
Package is licensed under MIT License.