32 lines
644 B
PHP
32 lines
644 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $extension
|
|
* @property int|null $attachment_group_id
|
|
* @property array|null $allowed_mimes
|
|
* @mixin \Eloquent
|
|
*/
|
|
class AttachmentExtension extends Model
|
|
{
|
|
protected $fillable = [
|
|
'extension',
|
|
'attachment_group_id',
|
|
'allowed_mimes',
|
|
];
|
|
|
|
protected $casts = [
|
|
'allowed_mimes' => 'array',
|
|
];
|
|
|
|
public function group(): BelongsTo
|
|
{
|
|
return $this->belongsTo(AttachmentGroup::class, 'attachment_group_id');
|
|
}
|
|
}
|