enniel / wampeer by enniel

Provide thruway library to laravel
11
1
2
Package Data
Maintainer Username: enniel
Package Create Date: 2016-08-05
Package Last Update: 2016-08-16
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-11 15:10:10
Package Statistics
Total Downloads: 11
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Build Status StyleCI License

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"]));