Added sum for the current period, see issue #99

This commit is contained in:
James Cole
2015-08-09 17:01:12 +02:00
parent 51e30aed66
commit deefef83bd
5 changed files with 11 additions and 3 deletions

View File

@@ -152,10 +152,11 @@ class CategoryController extends Controller
$set = $repository->getJournals($category, $page);
$count = $repository->countJournals($category);
$totalSum = $repository->journalsSum($category);
$periodSum = $repository->journalsSum($category, Session::get('start'), Session::get('end'));
$journals = new LengthAwarePaginator($set, $count, 50, $page);
$journals->setPath('categories/show/' . $category->id);
return view('categories.show', compact('category', 'journals', 'hideCategory', 'totalSum'));
return view('categories.show', compact('category', 'journals', 'hideCategory', 'totalSum', 'periodSum'));
}
/**