/home/techb158/ileadtechnology.com/SSM/app/Http/Requests/utility
Edit: /home/techb158/ileadtechnology.com/SSM/app/Http/Requests/utility/EmailTemplateRequest.php (1595B)
method() === 'POST') {
return [
'name' => 'required|unique:email_templates',
'category' => 'required|in:user'
];
} elseif ($this->method() === 'PATCH') {
return [
'subject' => 'required',
'body' => 'required'
];
}
}
/**
* Translate fields with user friendly name.
*
* @return array
*/
public function attributes()
{
if ($this->method() === 'POST') {
return [
'name' => trans('utility.email_template_name'),
'category' => trans('utility.email_template_category'),
];
} elseif ($this->method() === 'PATCH') {
return [
'subject' => trans('utility.email_template_subject'),
'body' => trans('utility.email_template_body'),
];
}
}
/**
* Get the error messages for the defined validation rules.
*
* @return array
*/
public function messages()
{
return [
];
}
}