public function index(FilterTransactionsRequest $request)
 {
     $tagId = $request->get('tag_id');
     list($startDate, $endDate) = $this->dateRange($request->get('date_range'));
     $transactions = Transaction::filtered($startDate, $endDate, $tagId)->get();
     return view('transactions.index', ['selectedTag' => $tagId, 'tags' => Tag::lists('name', 'id'), 'startDate' => $startDate->format('d/m/Y'), 'endDate' => $endDate->format('d/m/Y'), 'transactions' => $transactions, 'balance' => $this->balance->currentBalance(), 'lastBalance' => $this->balance->lastMonthBalance(), 'balanceIncrease' => $this->balance->balanceIncrease(Carbon::today()->subMonth()->endOfMonth()), 'expenses' => $this->expenses->expenses($startDate, $endDate), 'lastExpenses' => $this->expenses->lastMonthExpenses(), 'savings' => $this->savings->savings($startDate, $endDate), 'lastSavings' => $this->savings->lastMonthSavings(), 'income' => $this->income->income($startDate, $endDate), 'lastIncome' => $this->income->lastMonthIncome(), 'categories' => Transaction::byCategories($startDate, $endDate)->get()]);
 }