mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-30 09:53:58 +00:00
1dfb75545f
Fetch Currency Rate Logic Class Create Currency Rate Logic Class Update Currency Rate Logic Class Currency Rate Converter Rate
24 lines
678 B
PHP
24 lines
678 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Models\CurrencyRate;
|
|
use App\Models\CurrencyRateLog;
|
|
|
|
class CreatesCurrencyRateLog extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param Currency $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(CurrencyRate $object) {
|
|
$model = new CurrencyRateLog();
|
|
$model->currency_rate_id = $object->id;
|
|
$model->selling = $object->selling;
|
|
$model->created_by = \Auth::user()->id;
|
|
return $this->handler($model);
|
|
|
|
}
|
|
} |