@@ -69,12 +69,12 @@ public function target()
6969 };
7070
7171 return $ this ->morphTo ('target ' , 'target_type ' , 'target_id ' )
72- ->constrain (
73- collect (Nova::$ resources )
74- ->filter (static fn ($ resource ) => $ resource ::softDeletes ())
75- ->mapWithKeys (static fn ($ resource ) => [$ resource ::$ model => $ queryWithTrashed ])
76- ->all ()
77- )->when (true , static fn ($ query ) => $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query );
72+ ->constrain (
73+ collect (Nova::$ resources )
74+ ->filter (static fn ($ resource ) => $ resource ::softDeletes ())
75+ ->mapWithKeys (static fn ($ resource ) => [$ resource ::$ model => $ queryWithTrashed ])
76+ ->all ()
77+ )->when (true , static fn ($ query ) => $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query );
7878 }
7979
8080 /**
@@ -348,9 +348,9 @@ public static function prune(Collection $models, int $limit = 25): void
348348 ->whereNotIn ('id ' , static function ($ query ) use ($ model , $ limit ) {
349349 $ query ->select ('id ' )->fromSub (
350350 static ::select ('id ' )->orderBy ('id ' , 'desc ' )
351- ->where ('actionable_id ' , $ model ['actionable_id ' ])
352- ->where ('actionable_type ' , $ model ['actionable_type ' ])
353- ->limit ($ limit )->toBase (),
351+ ->where ('actionable_id ' , $ model ['actionable_id ' ])
352+ ->where ('actionable_type ' , $ model ['actionable_type ' ])
353+ ->limit ($ limit )->toBase (),
354354 'action_events_temp '
355355 );
356356 })->delete ();
@@ -363,7 +363,7 @@ public static function prune(Collection $models, int $limit = 25): void
363363 public static function markBatchAsRunning (string $ batchId ): int
364364 {
365365 return static ::where ('batch_id ' , $ batchId )
366- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
366+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
367367 'status ' => 'running ' ,
368368 ]);
369369 }
@@ -374,7 +374,7 @@ public static function markBatchAsRunning(string $batchId): int
374374 public static function markBatchAsFinished (string $ batchId ): int
375375 {
376376 return static ::where ('batch_id ' , $ batchId )
377- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
377+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
378378 'status ' => 'finished ' ,
379379 ]);
380380 }
@@ -397,7 +397,7 @@ public static function markAsFinished(string $batchId, $model): int
397397 public static function markBatchAsFailed (string $ batchId , Throwable |string |null $ e = null ): int
398398 {
399399 return static ::where ('batch_id ' , $ batchId )
400- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
400+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
401401 'status ' => 'failed ' ,
402402 'exception ' => $ e ? (string ) $ e : '' ,
403403 ]);
@@ -421,9 +421,9 @@ public static function markAsFailed(string $batchId, $model, Throwable|string|nu
421421 public static function updateStatus (string $ batchId , $ model , string $ status , Throwable |string |null $ e = null ): int
422422 {
423423 return static ::where ('batch_id ' , $ batchId )
424- ->where ('model_type ' , $ model ->getMorphClass ())
425- ->where ('model_id ' , $ model ->getKey ())
426- ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
424+ ->where ('model_type ' , $ model ->getMorphClass ())
425+ ->where ('model_id ' , $ model ->getKey ())
426+ ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
427427 }
428428
429429 /**
0 commit comments