Update DiscoverController, fixes #2009

pull/2013/head
Daniel Supernault 5 years ago
parent e313f2735b
commit b04c7170d7
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -42,7 +42,9 @@ class DiscoverController extends Controller
{ {
abort_if(!config('instance.discover.tags.is_public') && !Auth::check(), 403); abort_if(!config('instance.discover.tags.is_public') && !Auth::check(), 403);
$tag = Hashtag::whereSlug($hashtag)->firstOrFail(); $tag = Hashtag::whereName($hashtag)
->orWhere('slug', $hashtag)
->firstOrFail();
$tagCount = StatusHashtagService::count($tag->id); $tagCount = StatusHashtagService::count($tag->id);
return view('discover.tags.show', compact('tag', 'tagCount')); return view('discover.tags.show', compact('tag', 'tagCount'));
} }

Loading…
Cancel
Save