Added a sum of the current page and the sum of the entire category, in reference to issue #99.

This commit is contained in:
James Cole
2015-08-09 16:56:38 +02:00
parent 8d109a3cfe
commit 51e30aed66
8 changed files with 71 additions and 7 deletions

View File

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