WIP
This commit is contained in:
@@ -20,6 +20,10 @@ class Album extends Model
|
||||
return $this->hasMany(Image::class);
|
||||
}
|
||||
|
||||
public function mutations() : HasMany {
|
||||
return $this->hasMany(BatchMutation::class);
|
||||
}
|
||||
|
||||
public function media() : Collection {
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,22 @@ class Image extends Model implements HasThumbnail
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The model's default values for attributes.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $attributes = [
|
||||
'isCover' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['album_id'];
|
||||
|
||||
public function album(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Album::class);
|
||||
|
||||
Reference in New Issue
Block a user