22 lines
520 B
PHP
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);
|
|
}
|
|
}
|