Code optimizations.

This commit is contained in:
James Cole
2018-07-23 21:49:15 +02:00
parent 4fa5f4e5a3
commit 06d22e843a
33 changed files with 784 additions and 603 deletions

View File

@@ -83,7 +83,8 @@ class BudgetController extends Controller
*/
public function budget(Budget $budget): JsonResponse
{
$start = $this->repository->firstUseDate($budget);
/** @var Carbon $start */
$start = $this->repository->firstUseDate($budget) ?? session('start', new Carbon);
/** @var Carbon $end */
$end = session('end', new Carbon);
$cache = new CacheProperties();