Skip to content

Commit d9dc79d

Browse files
authored
Merge pull request #7 from snickom/patch-1
Fix migrationFileExists function
2 parents e9f79b6 + 709424e commit d9dc79d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PackageServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public function boot()
9898

9999
public static function migrationFileExists(string $migrationFileName): bool
100100
{
101-
$len = strlen($migrationFileName);
101+
$len = strlen($migrationFileName) + 4;
102102

103103
foreach (glob(database_path("migrations/*.php")) as $filename) {
104-
if ((substr($filename, -$len) === $migrationFileName)) {
104+
if ((substr($filename, -$len) === $migrationFileName . '.php')) {
105105
return true;
106106
}
107107
}

0 commit comments

Comments
 (0)