show transactions in pirep

This commit is contained in:
Nabeel Shahzad
2018-03-02 16:09:48 -06:00
parent 9d65515290
commit 2df09c533b
5 changed files with 77 additions and 5 deletions

View File

@@ -318,6 +318,12 @@ class Pirep extends BaseModel
->latest();
}
public function transactions()
{
return $this->hasMany(JournalTransaction::class, 'ref_class_id')
->where('ref_class', __CLASS__);
}
public function user()
{
return $this->belongsTo(User::class, 'user_id');