Browse Source

Update Profile model

Daniel Supernault 7 years ago
parent
commit
0cc736d109
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/Profile.php

+ 5 - 0
app/Profile.php

@@ -14,6 +14,11 @@ class Profile extends Model
 
     protected $visible = ['id', 'username', 'name'];
 
+    public function user()
+    {
+        return $this->belongsTo(User::class);
+    }
+
     public function url($suffix = '')
     {
         return url($this->username . $suffix);