@@ -67,12 +67,12 @@ public function target()
67
67
};
68
68
69
69
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 );
76
76
}
77
77
78
78
/**
@@ -346,9 +346,9 @@ public static function prune(Collection $models, int $limit = 25): void
346
346
->whereNotIn ('id ' , static function ($ query ) use ($ model , $ limit ) {
347
347
$ query ->select ('id ' )->fromSub (
348
348
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 (),
352
352
'action_events_temp '
353
353
);
354
354
})->delete ();
@@ -361,7 +361,7 @@ public static function prune(Collection $models, int $limit = 25): void
361
361
public static function markBatchAsRunning (string $ batchId ): int
362
362
{
363
363
return static ::where ('batch_id ' , $ batchId )
364
- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
364
+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
365
365
'status ' => 'running ' ,
366
366
]);
367
367
}
@@ -372,7 +372,7 @@ public static function markBatchAsRunning(string $batchId): int
372
372
public static function markBatchAsFinished (string $ batchId ): int
373
373
{
374
374
return static ::where ('batch_id ' , $ batchId )
375
- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
375
+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
376
376
'status ' => 'finished ' ,
377
377
]);
378
378
}
@@ -395,7 +395,7 @@ public static function markAsFinished(string $batchId, $model): int
395
395
public static function markBatchAsFailed (string $ batchId , Throwable |string |null $ e = null ): int
396
396
{
397
397
return static ::where ('batch_id ' , $ batchId )
398
- ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
398
+ ->whereNotIn ('status ' , ['finished ' , 'failed ' ])->update ([
399
399
'status ' => 'failed ' ,
400
400
'exception ' => $ e ? (string ) $ e : '' ,
401
401
]);
@@ -419,9 +419,9 @@ public static function markAsFailed(string $batchId, $model, Throwable|string|nu
419
419
public static function updateStatus (string $ batchId , $ model , string $ status , Throwable |string |null $ e = null ): int
420
420
{
421
421
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 ]);
425
425
}
426
426
427
427
/**
0 commit comments