Explorar el Código

Update StatusController

Daniel Supernault hace 6 años
padre
commit
84e01f1132
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      app/Http/Controllers/StatusController.php

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

@@ -259,7 +259,12 @@ class StatusController extends Controller
             $count++;
             SharePipeline::dispatch($share);
         }
-
+ 
+        if($count >= 0) {
+            $status->reblogs_count = $count;
+            $status->save();
+        }
+ 
         if ($request->ajax()) {
             $response = ['code' => 200, 'msg' => 'Share saved', 'count' => $count];
         } else {