mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update Activity model
This commit is contained in:
parent
01c7a95ef5
commit
884f675d30
1 changed files with 10 additions and 0 deletions
|
@ -7,4 +7,14 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class Activity extends Model
|
class Activity extends Model
|
||||||
{
|
{
|
||||||
protected $dates = ['processed_at'];
|
protected $dates = ['processed_at'];
|
||||||
|
|
||||||
|
public function toProfile()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Profile::class, 'to_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fromProfile()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Profile::class, 'from_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue