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