@@ -118,13 +118,15 @@ protected function configurePubSub()
118118 */
119119 protected function registerDashboardRoutes ()
120120 {
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 ' );
128130 });
129131
130132 return $ this ;
@@ -138,7 +140,7 @@ protected function registerDashboardRoutes()
138140 protected function registerDashboardGate ()
139141 {
140142 Gate::define ('viewWebSocketsDashboard ' , function ($ user = null ) {
141- return $ this ->app ->environment ('local ' );
143+ return $ this ->app ->environment ([ 'local ' , ' testing ' ] );
142144 });
143145
144146 return $ this ;
0 commit comments