Skip to content

Commit

Permalink
Ability to run actions against soft deleted model (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddzobov authored Sep 7, 2023
1 parent 20af8e3 commit babaf7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Requests/ActionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ public function models(): Collection
$models = collect();

if ($this->has('_models')) {
$models = $this->model()->whereIn(
$this->model()->getKeyName(),
$models = $this->getModelQuery()->findMany(
$this->get('_models')
)->get();
);
}

$current = $this->findModel();
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function getModelPaginationList()
/**
* @return Model
*/
private function getModelQuery()
protected function getModelQuery()
{
$query = $this->resource()->modelQuery($this, $this->model());

Expand Down

0 comments on commit babaf7d

Please sign in to comment.