mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 05:53:58 +00:00
30ed77f304
# Conflicts: # resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue # routes/api.php
28 lines
828 B
PHP
28 lines
828 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Affiliate\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\Affiliate\DataTransferObjects\AffiliateObject;
|
|
use App\Models\Affiliate;
|
|
|
|
class UpdatesAffiliate extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param Affiliate $model
|
|
* @param AffiliateObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(Affiliate $model, AffiliateObject $object)
|
|
{
|
|
// Don't update code if it already exists
|
|
$model->campaign_name = $object->getCampaignName();
|
|
$model->campaign_description = $object->getCampaignDescription();
|
|
$model->is_active = $object->getIsActive();
|
|
|
|
return $this->handler($model);
|
|
}
|
|
}
|
|
|