| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php namespace Arcanesoft\Blog\Http\Controllers\Front; |
||
| 27 | public function show($slug) |
||
| 28 | { |
||
| 29 | /** @var \Arcanesoft\Blog\Models\Post $post */ |
||
| 30 | $post = Post::published()->where('slug', $slug)->firstOrFail(); |
||
| 31 | |||
| 32 | $this->setTitle($post->seo->title); |
||
| 33 | $this->setDescription($post->seo->description); |
||
| 34 | $this->setKeywords($post->seo->keywords ? $post->seo->keywords->toArray() : []); |
||
| 35 | $this->addBreadcrumb($post->title); |
||
| 36 | |||
| 37 | return $this->view('blog::front.posts.single', compact('post')); |
||
| 38 | } |
||
| 39 | |||
| 47 |