farhatabbas / laravel-faye
Laravel package to easily interact with Faye server.
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/farhatabbas/laravel-faye
Requires
- php: >=5.6.25
- laravel/framework: 5.2.*
This package is not auto-updated.
Last update: 2025-10-12 01:02:59 UTC
README
Begin by installing this package through Composer. Run this command from the Terminal:
composer require farhatabbas/laravel-faye
Laravel integration
To wire this up in your Laravel project, whether it's built in Laravel 5, you need to add the service provider.
Open config/app.php
, and add a new item to the providers array.
Farhatabbas\Faye\FayeServiceProvider::class,
There's a Facade class available for you, if you like. In your app.php
config file add the following
line to the aliases
array if you want to use a short class name:
'Faye' => Farhatabbas\Faye\Facade\Faye::class,
In Laravel 5 you can publish the default config file to config/faye.php
with the artisan command
php artisan vendor:publish
Facade
First, include the Facade
class at the top of your file:
use Farhatabbas\Faye\Facade\Faye;
Usage
Route::get('/',function(){ Faye::send("/channel", ['data'=>'Hello World!'], ['token'=>'123456789']); });