diff --git a/app/Profile.php b/app/Profile.php index aab29148..cbb2dd1f 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -6,6 +6,11 @@ use Illuminate\Database\Eloquent\Model; class Profile extends Model { + public function url() + { + return url('/' . $this->username); + } + public function statuses() { return $this->hasMany(Status::class); @@ -34,4 +39,9 @@ class Profile extends Model 'id' ); } + + public function likes() + { + return $this->hasMany(Like::class); + } }