AndreiBu / php_websocket_client by AndreiBu

PHP WebSocket Client For Laravel.
41
0
2
Package Data
Maintainer Username: AndreiBu
Maintainer Contact: andrey.buldakoff@gmail.com (AndreiBu)
Package Create Date: 2017-03-24
Package Last Update: 2017-03-24
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:07:27
Package Statistics
Total Downloads: 41
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

PHP WebSocket Client

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 ')));


Contribute

https://github.com/AndreiBu/php_websocket_client/pulls