Update DiscoverController

pull/547/head
Daniel Supernault 8 years ago
parent 4a7a56f2cb
commit a616bd66f6
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -36,13 +36,17 @@ class DiscoverController extends Controller
->firstOrFail();
$posts = $tag->posts()
->whereHas('media')
->withCount(['likes', 'comments'])
->whereIsNsfw(false)
->whereVisibility('public')
->has('media')
->orderBy('id', 'desc')
->simplePaginate(12);
if($posts->count() == 0) {
abort(404);
}
return view('discover.tags.show', compact('tag', 'posts'));
}
}

Loading…
Cancel
Save