wip
This commit is contained in:
parent
fd2203c8bb
commit
e738d30c1a
|
|
@ -31,11 +31,10 @@ class WebSocketsServiceProvider extends ServiceProvider
|
||||||
], 'migrations');
|
], 'migrations');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->registerRouteMacro();
|
$this
|
||||||
|
->registerRouteMacro()
|
||||||
$this->registerStatisticRoute();
|
->registerStatisticRoute()
|
||||||
|
->registerDashboardGate();
|
||||||
$this->registerDashboardGate();
|
|
||||||
|
|
||||||
$this->loadViewsFrom(__DIR__ . '/../resources/views/', 'websockets');
|
$this->loadViewsFrom(__DIR__ . '/../resources/views/', 'websockets');
|
||||||
|
|
||||||
|
|
@ -71,6 +70,8 @@ class WebSocketsServiceProvider extends ServiceProvider
|
||||||
Route::post('event', SendMessage::class);
|
Route::post('event', SendMessage::class);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function registerStatisticRoute()
|
protected function registerStatisticRoute()
|
||||||
|
|
@ -78,6 +79,8 @@ class WebSocketsServiceProvider extends ServiceProvider
|
||||||
Route::prefix('/laravel-websockets')->namespace('\\')->group(function () {
|
Route::prefix('/laravel-websockets')->namespace('\\')->group(function () {
|
||||||
Route::post('statistics', [WebSocketStatisticsEntriesController::class, 'store']);
|
Route::post('statistics', [WebSocketStatisticsEntriesController::class, 'store']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function registerDashboardGate()
|
protected function registerDashboardGate()
|
||||||
|
|
@ -85,5 +88,7 @@ class WebSocketsServiceProvider extends ServiceProvider
|
||||||
Gate::define('viewWebSocketsDashboard', function ($user = null) {
|
Gate::define('viewWebSocketsDashboard', function ($user = null) {
|
||||||
return app()->environment('local');
|
return app()->environment('local');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue