mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 20:44:03 +00:00
30 lines
849 B
PHP
30 lines
849 B
PHP
<?php
|
|
|
|
namespace App\Modules\ControllerLogic\Contacts;
|
|
|
|
|
|
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
|
|
use App\Classes\Modules\Contacts\Services\UpdateContact;
|
|
use Illuminate\Http\Request;
|
|
|
|
class UpdateContactLogic
|
|
{
|
|
/** @var UpdateContact */
|
|
private $updateContact;
|
|
|
|
/**
|
|
* UpdateContactLogic constructor.
|
|
* @param UpdateContact $updateContact
|
|
*/
|
|
public function __construct(UpdateContact $updateContact)
|
|
{
|
|
$this->updateContact = $updateContact;
|
|
}
|
|
|
|
|
|
public function execute(int $id, string $referenceId, int $type, Request $request)
|
|
{
|
|
$object = new ContactObject($type, $referenceId, $request->input('name'), $request->input('contact'), $request->input('email'), $request->input('designation'));
|
|
return $this->updateContact->execute($id, $object);
|
|
}
|
|
} |