email support

This commit is contained in:
Simon Pocrnjič
2025-10-11 17:20:05 +02:00
parent 7c7defb6c5
commit 1b615163be
23 changed files with 3183 additions and 28 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphMany;
class EmailTemplate extends Model
{
use HasFactory;
protected $fillable = [
'name',
'key',
'subject_template',
'html_template',
'text_template',
'entity_types',
'active',
];
protected $casts = [
'active' => 'boolean',
'entity_types' => 'array',
];
public function documents(): MorphMany
{
return $this->morphMany(Document::class, 'documentable');
}
}