test websocket connection

This commit is contained in:
Čarodej
2022-05-20 16:48:25 +02:00
parent ab65aa8859
commit 63da860df5
8 changed files with 176 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace Domain\Settings\Controllers;
use Domain\Settings\Events\TestWebsocketConnectionEvent;
use Illuminate\Http\JsonResponse;
class TestWebsocketConnectionController
{
public function __invoke(): JsonResponse
{
TestWebsocketConnectionEvent::dispatch(
auth()->user()
);
return response()->json([
'type' => 'success',
'message' => 'The websocket test event was successfully dispatched.',
]);
}
}