1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 16:53:17 +00:00
pixelfed/app/Activity.php
2023-04-19 22:30:37 -06:00

24 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');
}
}