This commit is contained in:
freek 2018-11-26 01:01:18 +01:00
parent 7c0eadec2f
commit 41796a63a5
4 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>WebSockets Console</title>
<title>WebSockets Dashboard</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"

View File

@ -5,7 +5,7 @@ namespace BeyondCode\LaravelWebsockets\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Contracts\Broadcasting\Broadcaster;
class AuthenticateConsole
class AuthenticateDashboard
{
public function __invoke(Request $request, Broadcaster $broadcaster)
{

View File

@ -5,11 +5,11 @@ namespace BeyondCode\LaravelWebsockets\Http\Controllers;
use Illuminate\Http\Request;
use BeyondCode\LaravelWebSockets\ClientProviders\ClientProvider;
class ShowConsole
class ShowDashboard
{
public function __invoke(Request $request, ClientProvider $clients)
{
return view('websockets::console', [
return view('websockets::dashboard', [
'clients' => $clients->all()
]);
}

View File

@ -1,9 +1,9 @@
<?php
use BeyondCode\LaravelWebsockets\Http\Controllers\AuthenticateConsole;
use BeyondCode\LaravelWebsockets\Http\Controllers\AuthenticateDashboard;
use BeyondCode\LaravelWebsockets\Http\Controllers\SendMessage;
use BeyondCode\LaravelWebsockets\Http\Controllers\ShowConsole;
use BeyondCode\LaravelWebsockets\Http\Controllers\ShowDashboard;
Route::get('/', ShowConsole::class);
Route::post('/auth', AuthenticateConsole::class);
Route::get('/', ShowDashboard::class);
Route::post('/auth', AuthenticateDashboard::class);
Route::post('/event', SendMessage::class);