Browse Source

Update DiscoverController

Daniel Supernault 6 years ago
parent
commit
fdf7f0e121
1 changed files with 1 additions and 3 deletions
  1. 1 3
      app/Http/Controllers/DiscoverController.php

+ 1 - 3
app/Http/Controllers/DiscoverController.php

@@ -32,9 +32,7 @@ class DiscoverController extends Controller
           'page' => 'nullable|integer|min:1|max:20',
         ]);
 
-        $tag = Hashtag::with('posts')
-          ->withCount('posts')
-          ->whereSlug($hashtag)
+        $tag = Hashtag::whereSlug($hashtag)
           ->firstOrFail();
 
         $page = $request->input('page') ?? 1;