mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-21 13:34:13 +00:00
33 lines
809 B
PHP
33 lines
809 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\FreightForwarder\Services;
|
|
|
|
|
|
use App\Classes\Modules\ControllerLogic\Exceptions\InternalServerErrorException;
|
|
use App\Models\ServiceFees;
|
|
|
|
class DeletesServiceFees
|
|
{
|
|
/** @var ServiceFees */
|
|
private $repository;
|
|
|
|
/**
|
|
* DeletesServiceFees constructor.
|
|
* @param ServiceFees $repository
|
|
*/
|
|
public function __construct(ServiceFees $repository)
|
|
{
|
|
$this->repository = $repository;
|
|
}
|
|
|
|
public function execute(String $serviceId){
|
|
try{
|
|
|
|
$repository = $this->repository->findOrFail($serviceId);
|
|
$repository->delete();
|
|
|
|
}catch(\Exception $exception){
|
|
throw new InternalServerErrorException("Failed to delete Customer Relation because{$exception->getMessage()}");
|
|
}
|
|
}
|
|
} |