wip
This commit is contained in:
parent
6dfd723216
commit
121b818da1
|
|
@ -42,6 +42,11 @@ return [
|
|||
*/
|
||||
'max_request_size_in_kb' => 250,
|
||||
|
||||
/*
|
||||
* This model will be used to store the statistics of the WebSocketsServer
|
||||
*/
|
||||
'statistics_model' => \BeyondCode\LaravelWebSockets\Statistics\WebSocketsStatisticsEntry::class,
|
||||
|
||||
/*
|
||||
* Define the optional SSL context for your WebSocket connections.
|
||||
* You can see all available options at: http://php.net/manual/en/context.ssl.php
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace BeyondCode\LaravelWebSockets\Statistics\Http\Controllers;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Statistics\WebSocketsStatisticsEntry;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class WebsocketStatisticsEntriesController
|
||||
{
|
||||
public function store(Request $request)
|
||||
{
|
||||
$validatedAttributes = $request->validate([
|
||||
'app_id' => 'required',
|
||||
'peak_connections' => 'required|integer',
|
||||
'websocket_message_count' => 'required|integer',
|
||||
'api_message_count' => 'required|integer',
|
||||
]);
|
||||
|
||||
WebSocketsStatisticsEntry::create($validatedAttributes);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue