Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function show(Request $request, string $slug, int $id) |
||
18 | { |
||
19 | $category = ShopCategory::with('shopItems') |
||
20 | ->where('id', $id) |
||
21 | ->first(); |
||
22 | |||
23 | if (is_null($category)) { |
||
24 | return redirect() |
||
25 | ->route('shop.index') |
||
26 | ->with('danger', 'This category doesn\'t exist or has been deleted !'); |
||
27 | } |
||
28 | |||
29 | $items = $category->shopItems()->paginate(config('xetaravel.pagination.shop.item_per_page')); |
||
30 | |||
31 | $this->breadcrumbs->addCrumb("Category : " . e($category->title), $category->category_url); |
||
32 | |||
33 | return view( |
||
34 | 'Shop::category.show', |
||
35 | ['items' => $items, 'category' => $category, 'breadcrumbs' => $this->breadcrumbs] |
||
36 | ); |
||
39 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.