mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
delete note, add trait to other request
This commit is contained in:
parent
fccfce2ae8
commit
8684a3efc3
|
@ -15,7 +15,6 @@ trait MayContainCustomFields
|
||||||
$asset_model = AssetModel::find($this->model_id);
|
$asset_model = AssetModel::find($this->model_id);
|
||||||
}
|
}
|
||||||
if ($this->method() == 'PATCH' || $this->method() == 'PUT') {
|
if ($this->method() == 'PATCH' || $this->method() == 'PUT') {
|
||||||
// this is dependent on the asset update request PR
|
|
||||||
$asset_model = $this->asset;
|
$asset_model = $this->asset;
|
||||||
}
|
}
|
||||||
// collect the custom fields in the request
|
// collect the custom fields in the request
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use App\Http\Requests\Traits\MayContainCustomFields;
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
class UpdateAssetRequest extends ImageUploadRequest
|
class UpdateAssetRequest extends ImageUploadRequest
|
||||||
{
|
{
|
||||||
|
use MayContainCustomFields;
|
||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue