diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 317baf0b0..e1db420c8 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -13,7 +13,9 @@ class StatusController extends Controller public function show(Request $request, $username, int $id) { $user = Profile::whereUsername($username)->firstOrFail(); - $status = Status::whereProfileId($user->id)->findOrFail($id); + $status = Status::whereProfileId($user->id) + ->withCount('likes') + ->findOrFail($id); if(!$status->media_path && $status->in_reply_to_id) { return view('status.reply', compact('user', 'status')); } diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index b427b4847..0b0d7ab69 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -65,7 +65,7 @@