| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php namespace Arcanesoft\Blog\Http\Controllers\Front; |
||
| 20 | public function show($slug) |
||
| 21 | { |
||
| 22 | /** @var \Arcanesoft\Blog\Models\Category $category */ |
||
| 23 | $category = Category::query()->where('slug', $slug)->firstOrFail(); |
||
| 24 | $posts = $category->posts()->paginate(); |
||
| 25 | |||
| 26 | $this->setTitle($title = "Category: {$category->name}"); |
||
| 27 | $this->addBreadcrumb($title); |
||
| 28 | |||
| 29 | return $this->view('blog::front.categories.show', compact('category', 'posts')); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |