From 2d62195c4b1bd002a5aa26075699c7fe091c1556 Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 6 Mar 2024 08:31:51 +0100 Subject: [PATCH] handle relative path in migration file exists check --- src/PackageServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PackageServiceProvider.php b/src/PackageServiceProvider.php index 3d2cbb1..4a737c0 100644 --- a/src/PackageServiceProvider.php +++ b/src/PackageServiceProvider.php @@ -167,7 +167,8 @@ public function boot() public static function generateMigrationName(string $migrationFileName, Carbon $now): string { - $migrationsPath = 'migrations/'; + $migrationsPath = 'migrations/' . dirname($migrationFileName) . '/'; + $migrationFileName = basename($migrationFileName); $len = strlen($migrationFileName) + 4;