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.
25 lines
415 B
PHP
25 lines
415 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Activity extends Model
|
|
{
|
|
protected $casts = [
|
|
'processed_at' => 'datetime'
|
|
];
|
|
|
|
protected $fillable = ['data', 'to_id', 'from_id', 'object_type'];
|
|
|
|
public function toProfile()
|
|
{
|
|
return $this->belongsTo(Profile::class, 'to_id');
|
|
}
|
|
|
|
public function fromProfile()
|
|
{
|
|
return $this->belongsTo(Profile::class, 'from_id');
|
|
}
|
|
}
|