Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 8285f6d

Browse files
authored
Update WebSocketsServiceProvider.php
Use schema check instead of class name check.
1 parent 45d951c commit 8285f6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/WebSocketsServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Illuminate\Support\Facades\Gate;
1717
use Illuminate\Support\Facades\Route;
1818
use Illuminate\Support\ServiceProvider;
19+
use Illuminate\Support\Facades\Schema
1920

2021
class WebSocketsServiceProvider extends ServiceProvider
2122
{
@@ -25,7 +26,7 @@ public function boot()
2526
__DIR__.'/../config/websockets.php' => base_path('config/websockets.php'),
2627
], 'config');
2728

28-
if (! class_exists('CreateWebSocketsStatisticsEntriesTable')) {
29+
if (!Schema::hasTable('websockets_statistics_entries'))
2930
$this->publishes([
3031
__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'),
3132
], 'migrations');

0 commit comments

Comments
 (0)