Skip to content

Commit

Permalink
Allow edit soft deleted data (baijunyao/laravel-bjyblog#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
baijunyao committed Feb 16, 2022
1 parent 6d07c04 commit 231f092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function update(): JsonResource
$modelFQCN = static::getModelFQCN();
$resource = static::getResourceFQCN();

$model = $modelFQCN::find($this->getRouteId());
$model = $modelFQCN::withTrashed()->find($this->getRouteId());
$model->update($this->getFilteredPayload());

return new $resource($model);
Expand Down

0 comments on commit 231f092

Please sign in to comment.