added attchments
This commit is contained in:
31
app/Models/AttachmentExtension.php
Normal file
31
app/Models/AttachmentExtension.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user