@@ -67,12 +67,12 @@ public function target()
6767 };
6868
6969 return $ this ->morphTo ('target ' , 'target_type ' , 'target_id ' )
70- ->constrain (
71- collect (Nova::$ resources )
72- ->filter (static fn ($ resource ) => $ resource ::softDeletes ())
73- ->mapWithKeys (static fn ($ resource ) => [$ resource ::$ model => $ queryWithTrashed ])
74- ->all ()
75- )->when (true , static fn ($ query ) => $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query );
70+ ->constrain (
71+ collect (Nova::$ resources )
72+ ->filter (static fn ($ resource ) => $ resource ::softDeletes ())
73+ ->mapWithKeys (static fn ($ resource ) => [$ resource ::$ model => $ queryWithTrashed ])
74+ ->all ()
75+ )->when (true , static fn ($ query ) => $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query );
7676 }
7777
7878 /**
@@ -346,9 +346,9 @@ public static function prune(Collection $models, int $limit = 25): void
346346 ->whereNotIn ('id ' , static function ($ query ) use ($ model , $ limit ) {
347347 $ query ->select ('id ' )->fromSub (
348348 static ::select ('id ' )->orderBy ('id ' , 'desc ' )
349- ->where ('actionable_id ' , $ model ['actionable_id ' ])
350- ->where ('actionable_type ' , $ model ['actionable_type ' ])
351- ->limit ($ limit )->toBase (),
349+ ->where ('actionable_id ' , $ model ['actionable_id ' ])
350+ ->where ('actionable_type ' , $ model ['actionable_type ' ])
351+ ->limit ($ limit )->toBase (),
352352 'action_events_temp '
353353 );
354354 })->delete ();
@@ -361,7 +361,7 @@ public static function prune(Collection $models, int $limit = 25): void
361361 public static function markBatchAsRunning (string $ batchId ): int
362362 {
363363 return static ::where ('batch_id ' , $ batchId )
364- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
364+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
365365 'status ' => 'running ' ,
366366 ]);
367367 }
@@ -372,7 +372,7 @@ public static function markBatchAsRunning(string $batchId): int
372372 public static function markBatchAsFinished (string $ batchId ): int
373373 {
374374 return static ::where ('batch_id ' , $ batchId )
375- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
375+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
376376 'status ' => 'finished ' ,
377377 ]);
378378 }
@@ -395,7 +395,7 @@ public static function markAsFinished(string $batchId, $model): int
395395 public static function markBatchAsFailed (string $ batchId , Throwable |string |null $ e = null ): int
396396 {
397397 return static ::where ('batch_id ' , $ batchId )
398- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
398+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
399399 'status ' => 'failed ' ,
400400 'exception ' => $ e ? (string ) $ e : '' ,
401401 ]);
@@ -419,9 +419,9 @@ public static function markAsFailed(string $batchId, $model, Throwable|string|nu
419419 public static function updateStatus (string $ batchId , $ model , string $ status , Throwable |string |null $ e = null ): int
420420 {
421421 return static ::where ('batch_id ' , $ batchId )
422- ->where ('model_type ' , $ model ->getMorphClass ())
423- ->where ('model_id ' , $ model ->getKey ())
424- ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
422+ ->where ('model_type ' , $ model ->getMorphClass ())
423+ ->where ('model_id ' , $ model ->getKey ())
424+ ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
425425 }
426426
427427 /**
0 commit comments