Skip to content

Commit

Permalink
Search update
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislawfortonski committed May 3, 2021
1 parent 2db7da2 commit 310bd0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/PostsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ public function index(Request $request, $lang)
public function show($lang, $url)
{
$post = Post::findOrFailByUrl($url);
if ($post->isVisible() || (auth()->check() && (auth()->user()->id == $post->user_id || auth()->user()->hasRole('admin'))))
if ($post->isVisible() || (auth()->check() && (auth()->user()->id == $post->user_id || auth()->user()->hasRole('admin')))){
return view('app.'.config('blog.theme').'.posts.show')->with([
'post' => $post,
'content' => $post->content()->firstOrFail()
]);
}
else abort(404);
}
}

0 comments on commit 310bd0e

Please sign in to comment.