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/Models/Avatar.php

38 lines
686 B
PHTML

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
8 years ago
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @property-read bool $recentlyCreated computed/dynamic attribute
*/
class Avatar extends Model
{
8 years ago
use SoftDeletes;
protected $guarded = [];
7 months ago
protected function casts(): array
{
return [
'deleted_at' => 'datetime',
'last_fetched_at' => 'datetime',
'last_processed_at' => 'datetime',
];
}
protected $visible = [
'id',
'profile_id',
'media_path',
'size',
];
public function profile()
{
9 months ago
return $this->belongsTo(Profile::class);
}
}