Tidying up account payment gateway model

This commit is contained in:
Dave Earley 2016-07-16 11:44:23 +01:00
parent e93cc808c7
commit c9e7e0e671
1 changed files with 10 additions and 4 deletions

View File

@ -20,19 +20,25 @@ class AccountPaymentGateway extends MyBaseModel
'config'
];
/**
* Account associated with gateway
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function account() {
return $this->belongsTo('\App\Models\Account');
}
/**
* Parent payment gateway
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function payment_gateway()
{
return $this->belongsTo('\App\Models\PaymentGateway', 'payment_gateway_id', 'id');
}
/**
* @param $val
* @return mixed