diff --git a/src/Illuminate/Queue/Console/BatchesTableCommand.php b/src/Illuminate/Queue/Console/BatchesTableCommand.php index aa9912429961..ef7d0c8bfe69 100644 --- a/src/Illuminate/Queue/Console/BatchesTableCommand.php +++ b/src/Illuminate/Queue/Console/BatchesTableCommand.php @@ -63,10 +63,15 @@ protected function migrationExists($table) return parent::migrationExists($table); } - return count($this->files->glob(sprintf( - '{%s,%s}', + foreach ([ join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'), join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'), - ))) !== 0; + ] as $path) { + if (count($this->files->glob($path)) !== 0) { + return true; + } + } + + return false; } } diff --git a/src/Illuminate/Queue/Console/FailedTableCommand.php b/src/Illuminate/Queue/Console/FailedTableCommand.php index b8fe04ad7520..da997d0341e7 100644 --- a/src/Illuminate/Queue/Console/FailedTableCommand.php +++ b/src/Illuminate/Queue/Console/FailedTableCommand.php @@ -63,10 +63,15 @@ protected function migrationExists($table) return parent::migrationExists($table); } - return count($this->files->glob(sprintf( - '{%s,%s}', + foreach ([ join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'), join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'), - ))) !== 0; + ] as $path) { + if (count($this->files->glob($path)) !== 0) { + return true; + } + } + + return false; } } diff --git a/src/Illuminate/Queue/Console/TableCommand.php b/src/Illuminate/Queue/Console/TableCommand.php index a1bc6a90bc8b..d25afbe0704d 100644 --- a/src/Illuminate/Queue/Console/TableCommand.php +++ b/src/Illuminate/Queue/Console/TableCommand.php @@ -63,10 +63,15 @@ protected function migrationExists($table) return parent::migrationExists($table); } - return count($this->files->glob(sprintf( - '{%s,%s}', + foreach ([ join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'), join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'), - ))) !== 0; + ] as $path) { + if (count($this->files->glob($path)) !== 0) { + return true; + } + } + + return false; } } diff --git a/src/Illuminate/Session/Console/SessionTableCommand.php b/src/Illuminate/Session/Console/SessionTableCommand.php index dda47dafe901..76e6fa40407a 100644 --- a/src/Illuminate/Session/Console/SessionTableCommand.php +++ b/src/Illuminate/Session/Console/SessionTableCommand.php @@ -59,10 +59,15 @@ protected function migrationStubFile() */ protected function migrationExists($table) { - return count($this->files->glob(sprintf( - '{%s,%s}', + foreach ([ join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'), join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000000_create_users_table.php'), - ))) !== 0; + ] as $path) { + if (count($this->files->glob($path)) !== 0) { + return true; + } + } + + return false; } }