| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function show(string $slug, int $id) |
||
|
|
|||
| 31 | { |
||
| 32 | $category = BlogCategory::where('id', $id)->first(); |
||
| 33 | |||
| 34 | if (is_null($category)) { |
||
| 35 | return redirect() |
||
| 36 | ->route('blog.article.index') |
||
| 37 | ->error('This category does not exist or has been deleted !'); |
||
| 38 | } |
||
| 39 | |||
| 40 | $articles = $category->articles()->with('user', 'category')->paginate(config('xetaravel.pagination.blog.article_per_page')); |
||
| 41 | |||
| 42 | $this->breadcrumbs->addCrumb("Category : " . e($category->title), $category->show_url); |
||
| 43 | |||
| 44 | return view( |
||
| 45 | 'Blog.category.show', |
||
| 46 | ['articles' => $articles, 'category' => $category, 'breadcrumbs' => $this->breadcrumbs] |
||
| 47 | ); |
||
| 50 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.