mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
After quite some fumbling, fixed both the development import and some tests.
This commit is contained in:
@@ -13,6 +13,20 @@ class MigrationController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function dev() {
|
||||
$file = Config::get('dev.import');
|
||||
if(file_exists($file)) {
|
||||
$user = User::find(1);
|
||||
Auth::login($user);
|
||||
/** @var Firefly\Helper\Migration\MigrationHelperInterface $migration */
|
||||
$migration = App::make('Firefly\Helper\Migration\MigrationHelperInterface');
|
||||
$migration->loadFile($file);
|
||||
if ($migration->validFile()) {
|
||||
$migration->migrate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return View::make('migrate.index');
|
||||
|
||||
Reference in New Issue
Block a user