Browse Source

Add new method to User model

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

+ 5 - 0
app/User.php

@@ -31,4 +31,9 @@ class User extends Authenticatable
     {
         return $this->hasOne(Profile::class);
     }
+
+    public function url()
+    {
+        return url('/' . $this->username);
+    }
 }