some more cleanup + tests

This commit is contained in:
spencerrlongg
2024-03-20 15:18:15 -05:00
parent c155e4a7c9
commit d18aa1db98
3 changed files with 49 additions and 28 deletions
-11
View File
@@ -18,17 +18,6 @@ class UpdateAssetRequest extends ImageUploadRequest
return Gate::allows('update', new Asset);
}
public function prepareForValidation()
{
// the following are 'required' attributes that may or may not be present on an patch request
// so supplying them here instead of doing funky array modification to the rules
return $this->merge([
//'asset_tag' => $this->asset_tag ?? $this->asset->asset_tag,
//'model_id' => $this->model_id ?? $this->asset->model_id,
//'status_id' => $this->status_id ?? $this->asset->status_id,
]);
}
/**
* Get the validation rules that apply to the request.
*