Update DiscoverController, fixes #2009

This commit is contained in:
Daniel Supernault 2020-02-14 22:11:42 -07:00
parent e313f2735b
commit b04c7170d7
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -42,7 +42,9 @@ class DiscoverController extends Controller
{
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);
return view('discover.tags.show', compact('tag', 'tagCount'));
}