Skip to content

Commit

Permalink
Add fallback when migration is not anonymous class (#37166)
Browse files Browse the repository at this point in the history
  • Loading branch information
netpok committed Apr 28, 2021
1 parent 48af1c9 commit 6509ad8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Database/Migrations/Migrator.php
Expand Up @@ -474,7 +474,9 @@ protected function resolvePath(string $path)
return new $class;
}

return $this->files->getRequire($path);
$migration = $this->files->getRequire($path);

return is_object($migration) ? $migration : new $class;
}

/**
Expand Down

0 comments on commit 6509ad8

Please sign in to comment.