fix layout
This commit is contained in:
@@ -20,19 +20,37 @@ class CategoryController extends Controller
|
||||
|
||||
public function show(Request $request, $category_id)
|
||||
{
|
||||
switch ($request->input('article_nature')) {
|
||||
case 'semences':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
break;
|
||||
case 'plants':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 2;
|
||||
break;
|
||||
default:
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
break;
|
||||
}
|
||||
$data = [
|
||||
'category' => Categories::getFull($category_id),
|
||||
'breadcrumb' => Categories::getAncestorsByCategory($category_id),
|
||||
'display_by_rows' => $request->input('display_by_rows') ?? false,
|
||||
'product_type' => $request->input('product_type') ?? 'botanic',
|
||||
'product_type' => $product_type,
|
||||
'article_nature' => $request->input('article_nature'),
|
||||
'tags_selected' => $request->input('tags') ?? [],
|
||||
'articles' => Articles::getArticlesToSell([
|
||||
'category_id' => $category_id,
|
||||
'tags' => $request->input('tags') ?? [],
|
||||
'product_type' => $request->input('product_type') ?? 'botanic',
|
||||
'product_type' => $product_type,
|
||||
'article_nature_id' => $article_nature_id ?? false,
|
||||
]),
|
||||
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
|
||||
];
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Shop.Shelves.shelve', $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user