@@ -118,13 +118,15 @@ protected function configurePubSub()
118
118
*/
119
119
protected function registerDashboardRoutes ()
120
120
{
121
- Route::prefix (config ('websockets.dashboard.path ' ))->group (function () {
122
- Route::middleware (config ('websockets.dashboard.middleware ' , [AuthorizeDashboard::class]))->group (function () {
123
- Route::get ('/ ' , ShowDashboard::class);
124
- Route::get ('/api/{appId}/statistics ' , [DashboardApiController::class, 'getStatistics ' ]);
125
- Route::post ('auth ' , AuthenticateDashboard::class);
126
- Route::post ('event ' , SendMessage::class);
127
- });
121
+ Route::group ([
122
+ 'prefix ' => config ('websockets.dashboard.path ' ),
123
+ 'as ' => 'laravel-websockets. ' ,
124
+ 'middleware ' => config ('websockets.dashboard.middleware ' , [AuthorizeDashboard::class]),
125
+ ], function () {
126
+ Route::get ('/ ' , ShowDashboard::class)->name ('dashboard ' );
127
+ Route::get ('/api/{appId}/statistics ' , [DashboardApiController::class, 'getStatistics ' ])->name ('statistics ' );
128
+ Route::post ('auth ' , AuthenticateDashboard::class)->name ('auth ' );
129
+ Route::post ('event ' , SendMessage::class)->name ('send ' );
128
130
});
129
131
130
132
return $ this ;
@@ -138,7 +140,7 @@ protected function registerDashboardRoutes()
138
140
protected function registerDashboardGate ()
139
141
{
140
142
Gate::define ('viewWebSocketsDashboard ' , function ($ user = null ) {
141
- return $ this ->app ->environment ('local ' );
143
+ return $ this ->app ->environment ([ 'local ' , ' testing ' ] );
142
144
});
143
145
144
146
return $ this ;
0 commit comments