¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

View File

@@ -2,7 +2,7 @@
namespace Modules\Currency\Entities;
use Money\Currency;
use Illuminate\Http\JsonResponse;
use Modules\Support\Eloquent\Model;
use Illuminate\Support\Facades\Cache;
use Modules\Currency\Admin\CurrencyRateTable;
@@ -17,6 +17,7 @@ class CurrencyRate extends Model
*/
protected $fillable = ['currency', 'rate'];
/**
* Perform any actions required after the model boots.
*
@@ -29,10 +30,12 @@ class CurrencyRate extends Model
});
}
/**
* Refresh all supported currencies exchange rate.
*
* @param \Modules\Currency\Services\CurrencyRateExchanger $exchanger
* @param CurrencyRateExchanger $exchanger
*
* @return void
*/
public static function refreshRates(CurrencyRateExchanger $exchanger)
@@ -46,10 +49,12 @@ class CurrencyRate extends Model
}
}
/**
* Get currency rate for the given currency.
*
* @param string $currency
*
* @return int|float
*/
public static function for($currency)
@@ -59,10 +64,11 @@ class CurrencyRate extends Model
});
}
/**
* Get table data for the resource
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function table()
{