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.
pixelfed/app/Notification.php

47 lines
842 B
PHTML

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
7 years ago
use Illuminate\Database\Eloquent\SoftDeletes;
class Notification extends Model
{
7 years ago
use SoftDeletes;
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['deleted_at'];
protected $fillable = ['*'];
7 years ago
public function actor()
{
return $this->belongsTo(Profile::class, 'actor_id', 'id');
7 years ago
}
public function profile()
{
return $this->belongsTo(Profile::class, 'profile_id', 'id');
7 years ago
}
public function item()
{
return $this->morphTo();
7 years ago
}
public function status()
{
return $this->belongsTo(Status::class, 'item_id', 'id');
7 years ago
}
public function tag()
{
return $this->hasOne(MediaTag::class, 'item_id', 'id');
}
}