Add toggle by rows/by cards

This commit is contained in:
Ludovic CANDELLIER
2022-01-23 23:16:56 +01:00
parent f237882757
commit 4d3ffa2ca3
5 changed files with 33 additions and 11 deletions

View File

@@ -18,9 +18,10 @@ class CategoryController extends Controller
return $dataTable->render('Shop.Categories.list');
}
public function show($category_id)
public function show(Request $request, $category_id)
{
$data = self::init();
$data['display_by_rows'] = $request->input('by_rows') ?? false;
$data['category'] = Categories::getFull($category_id);
$data['articles'] = Articles::getArticlesToSell($category_id);
$data['tags'] = TagGroups::getWithTagsAndCountOffers();