mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-30 18:04:05 +00:00
25 lines
695 B
PHP
25 lines
695 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Orders\Services;
|
|
|
|
use App\Classes\Exceptions\MalformedRequestException;
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Models\ExchangeBookingOrder;
|
|
use App\Models\Order;
|
|
|
|
class ConnectOrderToExchangeBooking extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param Order $order
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws MalformedRequestException
|
|
*/
|
|
public function execute(Order $order, $exchangeBookingId)
|
|
{
|
|
$model = new ExchangeBookingOrder();
|
|
$model->order_id = $order->id;
|
|
$model->exchange_booking_id = $exchangeBookingId;
|
|
|
|
return $this->handler($model);
|
|
}
|
|
} |