mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
29 lines
865 B
PHP
29 lines
865 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Contacts\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
|
|
use App\Models\Contact;
|
|
|
|
class CreatesContact extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param ContactObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(ContactObject $object)
|
|
{
|
|
$model = new Contact();
|
|
$model->country_id = $object->getCountryId();
|
|
$model->company_id = $object->getCompanyId();
|
|
$model->reference = $object->getReference();
|
|
$model->phone = $object->getPhone();
|
|
$model->email = $object->getEmail();
|
|
$model->wechat_id = $object->getWechatId();
|
|
|
|
return $this->handler($model);
|
|
}
|
|
}
|