StyleCI fixed
This commit is contained in:
parent
84ef4ce14e
commit
94f24be368
|
|
@ -24,21 +24,21 @@ class WebSocketsServiceProvider extends ServiceProvider
|
|||
public function boot()
|
||||
{
|
||||
$this->publishes([
|
||||
__DIR__ . '/../config/websockets.php' => base_path('config/websockets.php'),
|
||||
__DIR__.'/../config/websockets.php' => base_path('config/websockets.php'),
|
||||
], 'config');
|
||||
|
||||
try {
|
||||
if (!Schema::hasTable('websockets_statistics_entries')) {
|
||||
if (! Schema::hasTable('websockets_statistics_entries')) {
|
||||
$this->publishes([
|
||||
__DIR__ . '/../database/migrations/create_websockets_statistics_entries_table.php.stub' => database_path('migrations/' . date('Y_m_d_His', time()) . '_create_websockets_statistics_entries_table.php'),
|
||||
], 'migrations');
|
||||
__DIR__.'/../database/migrations/create_websockets_statistics_entries_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_websockets_statistics_entries_table.php'),
|
||||
], 'migrations');
|
||||
}
|
||||
|
||||
$this
|
||||
->registerRoutes()
|
||||
->registerDashboardGate();
|
||||
->registerRoutes()
|
||||
->registerDashboardGate();
|
||||
|
||||
$this->loadViewsFrom(__DIR__ . '/../resources/views/', 'websockets');
|
||||
$this->loadViewsFrom(__DIR__.'/../resources/views/', 'websockets');
|
||||
|
||||
$this->commands([
|
||||
Console\StartWebSocketServer::class,
|
||||
|
|
@ -55,7 +55,7 @@ class WebSocketsServiceProvider extends ServiceProvider
|
|||
|
||||
public function register()
|
||||
{
|
||||
$this->mergeConfigFrom(__DIR__ . '/../config/websockets.php', 'websockets');
|
||||
$this->mergeConfigFrom(__DIR__.'/../config/websockets.php', 'websockets');
|
||||
|
||||
$this->app->singleton('websockets.router', function () {
|
||||
return new Router();
|
||||
|
|
@ -63,7 +63,7 @@ class WebSocketsServiceProvider extends ServiceProvider
|
|||
|
||||
$this->app->singleton(ChannelManager::class, function () {
|
||||
return config('websockets.channel_manager') !== null && class_exists(config('websockets.channel_manager'))
|
||||
? app(config('websockets.channel_manager')) : new ArrayChannelManager();
|
||||
? app(config('websockets.channel_manager')) : new ArrayChannelManager();
|
||||
});
|
||||
|
||||
$this->app->singleton(AppProvider::class, function () {
|
||||
|
|
@ -71,15 +71,12 @@ class WebSocketsServiceProvider extends ServiceProvider
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
protected function registerRoutes()
|
||||
{
|
||||
Route::prefix(config('websockets.path'))->group(function () {
|
||||
Route::middleware(config('websockets.middleware', [AuthorizeDashboard::class]))->group(function () {
|
||||
Route::get('/', ShowDashboard::class);
|
||||
Route::get('/api/{appId}/statistics', [DashboardApiController::class, 'getStatistics']);
|
||||
Route::get('/api/{appId}/statistics', [DashboardApiController::class, 'getStatistics']);
|
||||
Route::post('auth', AuthenticateDashboard::class);
|
||||
Route::post('event', SendMessage::class);
|
||||
});
|
||||
|
|
@ -92,9 +89,6 @@ class WebSocketsServiceProvider extends ServiceProvider
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
protected function registerDashboardGate()
|
||||
{
|
||||
Gate::define('viewWebSocketsDashboard', function ($user = null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue