Ken hace 2 horas
padre
commit
52c5993ec9
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/Models/Rebate.php

+ 2 - 2
app/Models/Rebate.php

@@ -25,13 +25,13 @@ class Rebate extends Authenticatable
     ];
 
 
-    static function updateProfit($data): void
+    static function updateProfit($data)
     {
         $data['date'] = Carbon::now('America/New_York')->format('Y-m-d');
         $rebate = static::where('date', $data['date'])
             ->where('member_id', $data['member_id'])->first();
         $rebate->increment('profit', $data['profit']);
-
+        return $rebate;
     }
 
     static function addOrUpdate($data)