Explorar el Código

Update Profile model

Daniel Supernault hace 7 años
padre
commit
0cc736d109
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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);