@@ -65,12 +65,12 @@ public function target()
6565 $ queryWithTrashed = static fn ($ query ) => $ query ->withTrashed ();
6666
6767 return $ this ->morphTo ('target ' , 'target_type ' , 'target_id ' )
68- ->constrain (
69- collect (Nova::$ resources )
70- ->filter (static fn ($ resource ) => $ resource ::softDeletes ())
71- ->mapWithKeys (static fn ($ resource ) => [$ resource ::$ model => $ queryWithTrashed ])
72- ->all ()
73- )->when (true , static fn ($ query ) => $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query );
68+ ->constrain (
69+ collect (Nova::$ resources )
70+ ->filter (static fn ($ resource ) => $ resource ::softDeletes ())
71+ ->mapWithKeys (static fn ($ resource ) => [$ resource ::$ model => $ queryWithTrashed ])
72+ ->all ()
73+ )->when (true , static fn ($ query ) => $ query ->hasMacro ('withTrashed ' ) ? $ queryWithTrashed ($ query ) : $ query );
7474 }
7575
7676 /**
@@ -344,9 +344,9 @@ public static function prune(Collection $models, int $limit = 25): void
344344 ->whereNotIn ('id ' , static function ($ query ) use ($ model , $ limit ) {
345345 $ query ->select ('id ' )->fromSub (
346346 static ::select ('id ' )->orderBy ('id ' , 'desc ' )
347- ->where ('actionable_id ' , $ model ['actionable_id ' ])
348- ->where ('actionable_type ' , $ model ['actionable_type ' ])
349- ->limit ($ limit )->toBase (),
347+ ->where ('actionable_id ' , $ model ['actionable_id ' ])
348+ ->where ('actionable_type ' , $ model ['actionable_type ' ])
349+ ->limit ($ limit )->toBase (),
350350 'action_events_temp '
351351 );
352352 })->delete ();
@@ -359,7 +359,7 @@ public static function prune(Collection $models, int $limit = 25): void
359359 public static function markBatchAsRunning (string $ batchId ): int
360360 {
361361 return static ::where ('batch_id ' , $ batchId )
362- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
362+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
363363 'status ' => 'running ' ,
364364 ]);
365365 }
@@ -370,7 +370,7 @@ public static function markBatchAsRunning(string $batchId): int
370370 public static function markBatchAsFinished (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 ' => 'finished ' ,
375375 ]);
376376 }
@@ -393,7 +393,7 @@ public static function markAsFinished(string $batchId, $model): int
393393 public static function markBatchAsFailed (string $ batchId , Throwable |string |null $ e = null ): int
394394 {
395395 return static ::where ('batch_id ' , $ batchId )
396- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
396+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
397397 'status ' => 'failed ' ,
398398 'exception ' => $ e ? (string ) $ e : '' ,
399399 ]);
@@ -417,9 +417,9 @@ public static function markAsFailed(string $batchId, $model, Throwable|string|nu
417417 public static function updateStatus (string $ batchId , $ model , string $ status , Throwable |string |null $ e = null ): int
418418 {
419419 return static ::where ('batch_id ' , $ batchId )
420- ->where ('model_type ' , $ model ->getMorphClass ())
421- ->where ('model_id ' , $ model ->getKey ())
422- ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
420+ ->where ('model_type ' , $ model ->getMorphClass ())
421+ ->where ('model_id ' , $ model ->getKey ())
422+ ->update (['status ' => $ status , 'exception ' => (string ) $ e ]);
423423 }
424424
425425 /**
0 commit comments