فهرست منبع

Update StatusController, fix reblog_count bug

Daniel Supernault 5 سال پیش
والد
کامیت
1dc65e933e
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      app/Http/Controllers/StatusController.php

+ 1 - 1
app/Http/Controllers/StatusController.php

@@ -175,7 +175,7 @@ class StatusController extends Controller
             ->whereIn('scope', ['public', 'unlisted'])
             ->whereIn('scope', ['public', 'unlisted'])
             ->findOrFail($request->input('item'));
             ->findOrFail($request->input('item'));
 
 
-        $count = $status->shares_count;
+        $count = $status->shares()->count();
 
 
         $exists = Status::whereProfileId(Auth::user()->profile->id)
         $exists = Status::whereProfileId(Auth::user()->profile->id)
                   ->whereReblogOfId($status->id)
                   ->whereReblogOfId($status->id)