After quite some fumbling, fixed both the development import and some tests.

This commit is contained in:
Sander Dorigo
2014-07-08 14:04:02 +02:00
parent f6e195736f
commit bd315fb7ce
8 changed files with 91 additions and 21 deletions

View File

@@ -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');