Răsfoiți Sursa

Update StatusController, fix reblog_count bug

Daniel Supernault 5 ani în urmă
părinte
comite
1dc65e933e
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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'])
             ->findOrFail($request->input('item'));
 
-        $count = $status->shares_count;
+        $count = $status->shares()->count();
 
         $exists = Status::whereProfileId(Auth::user()->profile->id)
                   ->whereReblogOfId($status->id)