File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ public function delete(int $id): mixed;
59
59
60
60
public function deleteWhere (array $ where ): ?bool ;
61
61
62
+ public function massDelete (): ?bool ;
63
+
62
64
public function forceDelete (int $ id ): mixed ;
63
65
64
66
public function restore (int $ id ): mixed ;
Original file line number Diff line number Diff line change @@ -366,6 +366,19 @@ public function deleteWhere(array $where): ?bool
366
366
return $ deleted ;
367
367
}
368
368
369
+ public function massDelete (): ?bool
370
+ {
371
+ $ this ->applyScope ();
372
+
373
+ $ deleted = $ this ->model ->delete ();
374
+
375
+ event (new RepositoryEntityDeleted ($ this , $ this ->model ->getModel ()));
376
+
377
+ $ this ->resetModel ();
378
+
379
+ return $ deleted ;
380
+ }
381
+
369
382
public function forceDelete (int $ id ): mixed
370
383
{
371
384
return $ this ->manageDeletes ($ id , 'forceDelete ' );
You can’t perform that action at this time.
0 commit comments