Cleaned up a lot of source, finished the ChartController. [skip ci]

This commit is contained in:
James Cole
2014-07-29 19:37:52 +02:00
parent 9054b20700
commit 9af2b47463
20 changed files with 450 additions and 347 deletions

View File

@@ -35,6 +35,7 @@ class MigrationHelper implements MigrationHelperInterface
// file does not exist:
if (!file_exists($this->path)) {
\Log::error('Migration file ' . $this->path . ' does not exist!');
return false;
}
@@ -50,6 +51,7 @@ class MigrationHelper implements MigrationHelperInterface
return false;
}
\Log::info('Migration file ' . $this->path . ' is valid!');
return true;
}
@@ -83,11 +85,13 @@ class MigrationHelper implements MigrationHelperInterface
\DB::rollBack();
\Log::error('Rollback because of error!');
\Log::error($e->getMessage());
return false;
}
\DB::commit();
\Log::info('Done!');
return true;
}
@@ -164,6 +168,7 @@ class MigrationHelper implements MigrationHelperInterface
{
/** @var \Firefly\Storage\Account\AccountRepositoryInterface $accounts */
$accounts = \App::make('Firefly\Storage\Account\AccountRepositoryInterface');
return $accounts->store(
[
'name' => $component->name,
@@ -181,6 +186,7 @@ class MigrationHelper implements MigrationHelperInterface
{
/** @var \Firefly\Storage\Component\ComponentRepositoryInterface $components */
$components = \App::make('Firefly\Storage\Component\ComponentRepositoryInterface');
return $components->store(['name' => $component->name, 'class' => 'Category']);
}
@@ -193,6 +199,7 @@ class MigrationHelper implements MigrationHelperInterface
{
/** @var \Firefly\Storage\Component\ComponentRepositoryInterface $components */
$components = \App::make('Firefly\Storage\Component\ComponentRepositoryInterface');
return $components->store(['name' => $component->name, 'class' => 'Budget']);
}