mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
25 lines
423 B
PHP
Executable File
25 lines
423 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Classes\ControllersLogic\Contacts;
|
|
|
|
use App\Models\Contact;
|
|
use App\Http\Resources\Contact as ContactResource;
|
|
|
|
class DeleteContact
|
|
{
|
|
public function execute(string $id) {
|
|
|
|
// Get address
|
|
$contact= Contact::findOrFail($id);
|
|
|
|
|
|
if($contact->delete()){
|
|
|
|
// Return single address as a resource
|
|
return new ContactResource($contact);
|
|
|
|
}
|
|
|
|
}
|
|
}
|