Refactor references to static facades. Improve budget controller code.

This commit is contained in:
James Cole
2018-07-14 16:08:34 +02:00
parent b8699422c8
commit 89834baf01
41 changed files with 284 additions and 246 deletions

View File

@@ -36,7 +36,6 @@ use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Log;
use Preferences;
use Symfony\Component\HttpFoundation\ParameterBag;
/**
@@ -220,7 +219,7 @@ class PiggyBankController extends Controller
$collection = $this->piggyRepos->getPiggyBanks();
$total = $collection->count();
$page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page');
$pageSize = (int)Preferences::get('listPageSize', 50)->data;
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$accounts = [];
/** @var Carbon $end */
$end = session('end', Carbon::now()->endOfMonth());