mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-29 09:23:57 +00:00
update contact recode and clean up
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: user
|
||||
* Date: 05/03/2019
|
||||
* Time: 2:35 PM
|
||||
*/
|
||||
|
||||
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, Request $request)
|
||||
{
|
||||
$object = new ContactObject($request->input('name'), $request->input('designation'), $request->input('contact'), $request->input('email'));
|
||||
|
||||
return $this->updateContact->execute($id, $object);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user