MailDetail
extends Model
in package
uses
HasFactory
Mail Detail Model
This model manages email templates and mail configurations for the CICMS system. It stores email templates with keys, purposes, subjects, and content for automated email communications and notifications.
Tags
Table of Contents
Properties
- $fillable : array<string|int, string>
- The attributes that are mass assignable.
Methods
- __construct() : void
- Create a new MailDetail model instance.
- getTemplate() : Collection
- Get email template based on unique key value.
Properties
$fillable
The attributes that are mass assignable.
protected
array<string|int, string>
$fillable
= ['mail_key', 'mail_purpose', 'mail_subject', 'mail_content', 'created_by', 'updated_by']
Methods
__construct()
Create a new MailDetail model instance.
public
__construct() : void
Sets the table name from configuration constants.
getTemplate()
Get email template based on unique key value.
public
getTemplate(string $key) : Collection
This function is used to retrieve message templates based on unique key values. It loads specific email templates for different purposes like notifications, confirmations, or system messages.
Parameters
- $key : string
-
Unique key value to load specific email template
Return values
Collection —Collection of matching email templates