@@ -67,14 +67,14 @@ public function target()
6767 };
6868
6969 return $ this ->morphTo ('target ' , 'target_type ' , 'target_id ' )
70- ->constrain (
71- collect (Nova::$ resources )
72- ->filter (function ($ resource ) {
73- return $ resource ::softDeletes ();
74- })->mapWithKeys (function ($ resource ) use ($ queryWithTrashed ) {
75- return [$ resource ::$ model => $ queryWithTrashed ];
76- })->all ()
77- )->when (true , function ($ query ) use ($ queryWithTrashed ) {
70+ ->constrain (
71+ collect (Nova::$ resources )
72+ ->filter (function ($ resource ) {
73+ return $ resource ::softDeletes ();
74+ })->mapWithKeys (function ($ resource ) use ($ queryWithTrashed ) {
75+ return [$ resource ::$ model => $ queryWithTrashed ];
76+ })->all ()
77+ )->when (true , function ($ query ) use ($ queryWithTrashed ) {
7878 return $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query ;
7979 });
8080 }
@@ -355,9 +355,9 @@ public static function prune(Collection $models, int $limit = 25): void
355355 ->whereNotIn ('id ' , function ($ query ) use ($ model , $ limit ) {
356356 $ query ->select ('id ' )->fromSub (
357357 static ::select ('id ' )->orderBy ('id ' , 'desc ' )
358- ->where ('actionable_id ' , $ model ['actionable_id ' ])
359- ->where ('actionable_type ' , $ model ['actionable_type ' ])
360- ->limit ($ limit )->toBase (),
358+ ->where ('actionable_id ' , $ model ['actionable_id ' ])
359+ ->where ('actionable_type ' , $ model ['actionable_type ' ])
360+ ->limit ($ limit )->toBase (),
361361 'action_events_temp '
362362 );
363363 })->delete ();
@@ -370,7 +370,7 @@ public static function prune(Collection $models, int $limit = 25): void
370370 public static function markBatchAsRunning (string $ batchId ): int
371371 {
372372 return static ::where ('batch_id ' , $ batchId )
373- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
373+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
374374 'status ' => 'running ' ,
375375 ]);
376376 }
@@ -381,7 +381,7 @@ public static function markBatchAsRunning(string $batchId): int
381381 public static function markBatchAsFinished (string $ batchId ): int
382382 {
383383 return static ::where ('batch_id ' , $ batchId )
384- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
384+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
385385 'status ' => 'finished ' ,
386386 ]);
387387 }
@@ -404,7 +404,7 @@ public static function markAsFinished(string $batchId, $model): int
404404 public static function markBatchAsFailed (string $ batchId , Throwable |string |null $ e = null ): int
405405 {
406406 return static ::where ('batch_id ' , $ batchId )
407- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
407+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
408408 'status ' => 'failed ' ,
409409 'exception ' => $ e ? (string ) $ e : '' ,
410410 ]);
@@ -428,9 +428,9 @@ public static function markAsFailed(string $batchId, $model, Throwable|string|nu
428428 public static function updateStatus (string $ batchId , $ model , string $ status , Throwable |string |null $ e = null ): int
429429 {
430430 return static ::where ('batch_id ' , $ batchId )
431- ->where ('model_type ' , $ model ->getMorphClass ())
432- ->where ('model_id ' , $ model ->getKey ())
433- ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
431+ ->where ('model_type ' , $ model ->getMorphClass ())
432+ ->where ('model_id ' , $ model ->getKey ())
433+ ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
434434 }
435435
436436 /**
@@ -447,8 +447,8 @@ public function getTable(): string
447447 protected static function hydrateChangesPayload (array $ attributes ): array
448448 {
449449 return collect ($ attributes )
450- ->transform (function ($ value ) {
451- return Util::hydrate ($ value );
452- })->all ();
450+ ->transform (function ($ value ) {
451+ return Util::hydrate ($ value );
452+ })->all ();
453453 }
454454}
0 commit comments