Clean up repository.

This commit is contained in:
James Cole
2016-05-20 09:25:17 +02:00
parent 66d7fd7d4c
commit 65b8882ed4
12 changed files with 472 additions and 342 deletions

View File

@@ -53,5 +53,19 @@ class CrudServiceProvider extends ServiceProvider
return app('FireflyIII\Crud\Split\Journal', $arguments);
}
);
$this->app->bind(
'FireflyIII\Crud\Account\AccountCrudInterface',
function (Application $app, array $arguments) {
if (!isset($arguments[0]) && $app->auth->check()) {
return app('FireflyIII\Crud\Account\AccountCrud', [$app->auth->user()]);
}
if (!isset($arguments[0]) && !$app->auth->check()) {
throw new FireflyException('There is no user present.');
}
return app('FireflyIII\Crud\Account\AccountCrud', $arguments);
}
);
}
}