|
@@ -13,7 +13,9 @@ class StatusController extends Controller
|
|
public function show(Request $request, $username, int $id)
|
|
public function show(Request $request, $username, int $id)
|
|
{
|
|
{
|
|
$user = Profile::whereUsername($username)->firstOrFail();
|
|
$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) {
|
|
if(!$status->media_path && $status->in_reply_to_id) {
|
|
return view('status.reply', compact('user', 'status'));
|
|
return view('status.reply', compact('user', 'status'));
|
|
}
|
|
}
|