Files
servicedesk/src/app/Models/NotificationSetting.php
2026-07-21 23:39:19 +02:00

22 lines
520 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable(['trigger_key', 'trigger_label', 'enabled', 'recipient', 'email_template_id'])]
class NotificationSetting extends Model
{
protected function casts(): array
{
return ['enabled' => 'boolean'];
}
public function emailTemplate(): BelongsTo
{
return $this->belongsTo(EmailTemplate::class);
}
}