From ec6a3f3b9e70ae008d7866280327e0faa0f0ae4f Mon Sep 17 00:00:00 2001 From: Simon Depelchin Date: Fri, 2 Mar 2018 15:57:49 +0100 Subject: [PATCH] Adding the owner relationship in the Wallet model --- src/Wallet.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Wallet.php b/src/Wallet.php index 1640f27..cbda0da 100644 --- a/src/Wallet.php +++ b/src/Wallet.php @@ -15,4 +15,12 @@ public function transactions() return $this->hasMany(config('wallet.transaction_model', Transaction::class)); } + /** + * Retrieve owner + */ + public function user() + { + return $this->belongsTo(config('wallet.user_model', \App\User::class)); + } + } \ No newline at end of file