andreibu / php_websocket_client
PHP WebSocket Client For Laravel.
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.3.23
This package is not auto-updated.
Last update: 2024-11-23 21:15:26 UTC
README
Installation
composer require andreibu/php_websocket_client
Laravel 5
Setup
Add ServiceProvider to the providers array in config/app.php
.
'providers' => [
...
AndreiBu\php_websocket_client\WSServiceProvider::class,
],
'aliases' => [
...
'PHP_WS' => AndreiBu\php_websocket_client\Facades\PHP_WS::class,
],
Configuration
host port path
Usage
send
use PHP_WS; PHP_WS::send(json_encode(array('type'=>'send_message_to','id'=>'1000001','msg'=>'laravel msg ')));