Merge pull request #411 from robindrost/patch-1

Update statistics table name check
This commit is contained in:
rennokki 2020-08-13 08:19:01 +03:00 committed by GitHub
commit 4c12fb3490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManagers\ArrayChannelManager;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
class WebSocketsServiceProvider extends ServiceProvider
@ -25,7 +26,7 @@ class WebSocketsServiceProvider extends ServiceProvider
__DIR__.'/../config/websockets.php' => base_path('config/websockets.php'),
], 'config');
if (! class_exists('CreateWebSocketsStatisticsEntries')) {
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');