2018-07-24 11:11:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Webkul\Core\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2018-12-07 05:25:33 +00:00
|
|
|
use Webkul\Core\Models\CurrencyExchangeRate;
|
2018-07-24 11:11:32 +00:00
|
|
|
|
|
|
|
|
class Currency extends Model
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $fillable = [
|
2018-10-18 08:19:03 +00:00
|
|
|
'code', 'name'
|
2018-07-24 11:11:32 +00:00
|
|
|
];
|
2018-12-07 05:25:33 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the currency_exchange associated with the currency.
|
|
|
|
|
*/
|
|
|
|
|
public function CurrencyExchangeRate()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasOne(CurrencyExchangeRate::class, 'target_currency');
|
|
|
|
|
}
|
2018-07-24 11:11:32 +00:00
|
|
|
}
|