enniel / wampeer
Provide thruway library to laravel
dev-master
2016-08-16 05:41 UTC
Requires
- php: >=5.5.9
- illuminate/console: ~5.1
- illuminate/support: ~5.1
- voryx/thruway: ~0.4
Requires (Dev)
- orchestra/testbench: ~3.1
- phpunit/phpunit: ~4.0||~5.0
This package is auto-updated.
Last update: 2024-11-06 04:09:19 UTC
README
Wampeer
Composer
To install as a Composer package to be used with Laravel 5, simply run:
composer require "enniel/wampeer"
Once it's installed, you can register the service provider in config/app.php
in the providers
array:
'providers' => [ \Enniel\Wampeer\Providers\WampeerServiceProvider::class, ]
You can use the facade for shorter code. Add this to your aliases:
'aliases' => [ 'WampRouter' => \Enniel\Wampeer\Facades\Router::class, ]
Then publish assets with php artisan vendor:publish
. This will add the file config/wampeer.php
.
Usage
Set up code in the boot method at your provider
WampRouter::registerModules([
// Websocket listener
new RatchetTransportProvider(),
// Rawsocket listener
new RawSocketTransportProvider(),
]);
WampRouter::addInternalClient(new SimpleAuthProviderClient(["testSimpleAuthRealm", "authful_realm"]));