diff --git a/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php b/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php index 8a50abf60..7a4b3e2c0 100644 --- a/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php @@ -1,5 +1,4 @@ resolve($file); + $migration = $this->resolve($file, $extension); $migration->up(); @@ -181,7 +181,7 @@ class Migrator // First we will get the file name of the migration so we can resolve out an // instance of the migration. Once we get an instance we can either run a // pretend execution of the migration or we can run the real migration. - $instance = $this->resolve($file); + $instance = $this->resolve($file, $extension); $instance->down(); @@ -242,11 +242,13 @@ class Migrator * @param string $file * @return object */ - public function resolve($file) + public function resolve($file, $extension = null) { $file = implode('_', array_slice(explode('_', $file), 4)); - $class = Str::studly($file); + $class = 'Flarum\\Migrations\\' . ($extension ? Str::studly($extension) : 'Core') . '\\'; + + $class .= Str::studly($file); return app()->make($class); }