mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
589 B
PHTML
38 lines
589 B
PHTML
7 years ago
|
<?php
|
||
|
|
||
|
namespace App;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class Profile extends Model
|
||
|
{
|
||
|
public function statuses()
|
||
|
{
|
||
|
return $this->hasMany(Status::class);
|
||
|
}
|
||
|
|
||
|
public function following()
|
||
|
{
|
||
|
return $this->hasManyThrough(
|
||
|
Profile::class,
|
||
|
Follower::class,
|
||
|
'profile_id',
|
||
|
'id',
|
||
|
'id',
|
||
|
'id'
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public function followers()
|
||
|
{
|
||
|
return $this->hasManyThrough(
|
||
|
Profile::class,
|
||
|
Follower::class,
|
||
|
'following_id',
|
||
|
'id',
|
||
|
'id',
|
||
|
'id'
|
||
|
);
|
||
|
}
|
||
|
}
|