merge([ 'asset_tag' => $this->asset_tag ?? Asset::autoincrement_asset(), 'company_id' => Company::getIdForCurrentUser($this->company_id), ]); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { $rules = array_merge( (new Asset)->getRules(), parent::rules(), ); return $rules; } }