delete note, add trait to other request

This commit is contained in:
spencerrlongg 2024-07-30 21:22:46 -05:00
parent fccfce2ae8
commit 8684a3efc3
2 changed files with 2 additions and 1 deletions

View file

@ -15,7 +15,6 @@ trait MayContainCustomFields
$asset_model = AssetModel::find($this->model_id);
}
if ($this->method() == 'PATCH' || $this->method() == 'PUT') {
// this is dependent on the asset update request PR
$asset_model = $this->asset;
}
// collect the custom fields in the request

View file

@ -2,12 +2,14 @@
namespace App\Http\Requests;
use App\Http\Requests\Traits\MayContainCustomFields;
use App\Models\Asset;
use Illuminate\Support\Facades\Gate;
use Illuminate\Validation\Rule;
class UpdateAssetRequest extends ImageUploadRequest
{
use MayContainCustomFields;
/**
* Determine if the user is authorized to make this request.
*