Skip to content

Commit

Permalink
Adding the owner relationship in the Wallet model
Browse files Browse the repository at this point in the history
  • Loading branch information
depsimon committed Mar 2, 2018
1 parent bfe4872 commit ec6a3f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Wallet.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

}

0 comments on commit ec6a3f3

Please sign in to comment.