@@ -24,21 +24,21 @@ class WebSocketsServiceProvider extends ServiceProvider
24
24
public function boot ()
25
25
{
26
26
$ this ->publishes ([
27
- __DIR__ . '/../config/websockets.php ' => base_path ('config/websockets.php ' ),
27
+ __DIR__ . '/../config/websockets.php ' => base_path ('config/websockets.php ' ),
28
28
], 'config ' );
29
29
30
30
try {
31
- if (!Schema::hasTable ('websockets_statistics_entries ' )) {
31
+ if (! Schema::hasTable ('websockets_statistics_entries ' )) {
32
32
$ this ->publishes ([
33
- __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 ' ),
34
- ], 'migrations ' );
33
+ __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 ' ),
34
+ ], 'migrations ' );
35
35
}
36
36
37
37
$ this
38
- ->registerRoutes ()
39
- ->registerDashboardGate ();
38
+ ->registerRoutes ()
39
+ ->registerDashboardGate ();
40
40
41
- $ this ->loadViewsFrom (__DIR__ . '/../resources/views/ ' , 'websockets ' );
41
+ $ this ->loadViewsFrom (__DIR__ . '/../resources/views/ ' , 'websockets ' );
42
42
43
43
$ this ->commands ([
44
44
Console \StartWebSocketServer::class,
@@ -55,31 +55,28 @@ public function boot()
55
55
56
56
public function register ()
57
57
{
58
- $ this ->mergeConfigFrom (__DIR__ . '/../config/websockets.php ' , 'websockets ' );
58
+ $ this ->mergeConfigFrom (__DIR__ . '/../config/websockets.php ' , 'websockets ' );
59
59
60
60
$ this ->app ->singleton ('websockets.router ' , function () {
61
61
return new Router ();
62
62
});
63
63
64
64
$ this ->app ->singleton (ChannelManager::class, function () {
65
65
return config ('websockets.channel_manager ' ) !== null && class_exists (config ('websockets.channel_manager ' ))
66
- ? app (config ('websockets.channel_manager ' )) : new ArrayChannelManager ();
66
+ ? app (config ('websockets.channel_manager ' )) : new ArrayChannelManager ();
67
67
});
68
68
69
69
$ this ->app ->singleton (AppProvider::class, function () {
70
70
return app (config ('websockets.app_provider ' ));
71
71
});
72
72
}
73
73
74
- /**
75
- * @return mixed
76
- */
77
74
protected function registerRoutes ()
78
75
{
79
76
Route::prefix (config ('websockets.path ' ))->group (function () {
80
77
Route::middleware (config ('websockets.middleware ' , [AuthorizeDashboard::class]))->group (function () {
81
78
Route::get ('/ ' , ShowDashboard::class);
82
- Route::get ('/api/{appId}/statistics ' , [DashboardApiController::class, 'getStatistics ' ]);
79
+ Route::get ('/api/{appId}/statistics ' , [DashboardApiController::class, 'getStatistics ' ]);
83
80
Route::post ('auth ' , AuthenticateDashboard::class);
84
81
Route::post ('event ' , SendMessage::class);
85
82
});
@@ -92,9 +89,6 @@ protected function registerRoutes()
92
89
return $ this ;
93
90
}
94
91
95
- /**
96
- * @return mixed
97
- */
98
92
protected function registerDashboardGate ()
99
93
{
100
94
Gate::define ('viewWebSocketsDashboard ' , function ($ user = null ) {
0 commit comments