Update app() calls

This commit is contained in:
James Cole
2017-02-05 16:16:15 +01:00
parent 77e52f42a6
commit 8a98204a69
51 changed files with 174 additions and 99 deletions

View File

@@ -72,7 +72,8 @@ class TransactionController extends Controller
$end = session('end', Navigation::endOfPeriod(new Carbon, $range));
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
$collector = app(JournalCollectorInterface::class);
$collector->setUser(auth()->user());
$collector->setTypes($types)->setLimit($pageSize)->setPage($page)->setAllAssetAccounts();
$collector->setRange($start, $end)->withBudgetInformation()->withCategoryInformation();
@@ -122,7 +123,8 @@ class TransactionController extends Controller
$subTitle = sprintf('%s (%s)', trans('firefly.title_' . $what), strtolower(trans('firefly.everything')));
$page = intval($request->get('page')) === 0 ? 1 : intval($request->get('page'));
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
$collector = app(JournalCollectorInterface::class);
$collector->setUser(auth()->user());
$collector->setTypes($types)->setLimit($pageSize)->setPage($page)->setAllAssetAccounts()->withBudgetInformation()->withCategoryInformation();
// do not filter transfers if $what = transfer.
@@ -161,7 +163,8 @@ class TransactionController extends Controller
Log::debug(sprintf('Transaction index by date will show between %s and %s', $start->format('Y-m-d'), $end->format('Y-m-d')));
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
$collector = app(JournalCollectorInterface::class);
$collector->setUser(auth()->user());
$collector->setTypes($types)->setLimit($pageSize)->setPage($page)->setAllAssetAccounts();
$collector->setRange($start, $end)->withBudgetInformation()->withCategoryInformation();