소스 검색

Update DiscoverController

Daniel Supernault 6 년 전
부모
커밋
fdf7f0e121
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  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;