Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enniel/wampeer
Wamp v2 abstraction for Laravel using Thruway library https://github.com/voryx/Thruway
https://github.com/enniel/wampeer
Last synced: about 1 month ago
JSON representation
Wamp v2 abstraction for Laravel using Thruway library https://github.com/voryx/Thruway
- Host: GitHub
- URL: https://github.com/enniel/wampeer
- Owner: enniel
- Created: 2016-08-05T09:01:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-16T05:41:31.000Z (over 8 years ago)
- Last Synced: 2024-11-06T08:08:03.975Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/enniel/wampeer.svg?branch=master)](https://travis-ci.org/enniel/wampeer)
[![StyleCI](https://styleci.io/repos/65004698/shield)](https://styleci.io/repos/65004698)
[![License](https://poser.pugx.org/enniel/wampeer/license)](https://packagist.org/packages/enniel/wampeer)
# Wampeer## Composer
To install as a Composer package to be used with Laravel 5, simply run:
```sh
composer require "enniel/wampeer"
```Once it's installed, you can register the service provider in `config/app.php` in the `providers` array:
```php
'providers' => [
\Enniel\Wampeer\Providers\WampeerServiceProvider::class,
]
```You can use the facade for shorter code. Add this to your aliases:
```php
'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"]));
```