sarga/packages/Webkul/Core/src/Models/Currency.php

26 lines
567 B
PHP
Raw Normal View History

2018-07-24 11:11:32 +00:00
<?php
namespace Webkul\Core\Models;
use Illuminate\Database\Eloquent\Model;
2019-02-18 07:30:40 +00:00
use Webkul\Core\Contracts\Currency as CurrencyContract;
2018-07-24 11:11:32 +00:00
2019-02-18 07:30:40 +00:00
class Currency extends Model implements CurrencyContract
2018-07-24 11:11:32 +00:00
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'code', 'name'
2018-07-24 11:11:32 +00:00
];
/**
* Get the currency_exchange associated with the currency.
*/
public function CurrencyExchangeRate()
{
2019-02-18 07:30:40 +00:00
return $this->hasOne(CurrencyExchangeRateProxy::modelClass(), 'target_currency');
}
2018-07-24 11:11:32 +00:00
}