Merge branch 'master' of github.com:beyondcode/laravel-websockets

This commit is contained in:
freek 2018-11-27 16:05:33 +01:00
commit 0641dd6bdf
6 changed files with 15 additions and 11 deletions

View File

@ -4,7 +4,11 @@ namespace BeyondCode\LaravelWebSockets\Server;
use BeyondCode\LaravelWebSockets\LaravelEcho;
use BeyondCode\LaravelWebSockets\Server\Logger\MessageLogger;
use BeyondCode\LaravelWebSockets\Server\WebSocketController;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\FetchChannel;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\FetchChannels;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\FetchUsers;
use BeyondCode\LaravelWebSockets\WebSocketServer\Controllers\TriggerEvent;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\PusherController;
use Ratchet\WebSocket\WsServer;
use Symfony\Component\Routing\Route;
use Ratchet\Http\HttpServerInterface;
@ -67,13 +71,13 @@ class Router
public function echo()
{
$this->get('/app/{appKey}', LaravelEcho\Pusher\PusherServer::class);
$this->get('/app/{appKey}', PusherController::class);
$this->get('/apps/{appId}/channels', LaravelEcho\Http\Controllers\FetchChannels::class);
$this->get('/apps/{appId}/channels/{channelName}', LaravelEcho\Http\Controllers\FetchChannel::class);
$this->get('/apps/{appId}/channels/{channelName}/users', LaravelEcho\Http\Controllers\FetchUsers::class);
$this->get('/apps/{appId}/channels', FetchChannels::class);
$this->get('/apps/{appId}/channels/{channelName}', FetchChannel::class);
$this->get('/apps/{appId}/channels/{channelName}/users', FetchUsers::class);
$this->post('/apps/{appId}/events', LaravelEcho\Http\Controllers\TriggerEvent::class);
$this->post('/apps/{appId}/events', TriggerEvent::class);
}
/**

View File

@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager;
abstract class EchoController implements HttpServerInterface
abstract class Controller implements HttpServerInterface
{
/** @var \BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\ChannelManager */
protected $channelManager;

View File

@ -5,7 +5,7 @@ namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers;
use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\HttpException;
class FetchChannel extends EchoController
class FetchChannel extends Controller
{
public function __invoke(Request $request)
{

View File

@ -6,7 +6,7 @@ use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\PresenceChannel;
class FetchChannels extends EchoController
class FetchChannels extends Controller
{
public function __invoke(Request $request)
{

View File

@ -7,7 +7,7 @@ use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\HttpException;
use BeyondCode\LaravelWebSockets\WebSocketServer\Pusher\Channels\PresenceChannel;
class FetchUsers extends EchoController
class FetchUsers extends Controller
{
public function __invoke(Request $request)
{

View File

@ -5,7 +5,7 @@ namespace BeyondCode\LaravelWebSockets\WebSocketServer\Controllers;
use BeyondCode\LaravelWebSockets\Events\ApiMessageSent;
use Illuminate\Http\Request;
class TriggerEvent extends EchoController
class TriggerEvent extends Controller
{
public function __invoke(Request $request)
{