'required|unique:system_mail_layouts', 'name' => 'required', 'content_html' => 'required', ]; public function beforeDelete() { if ($this->is_locked) throw new ApplicationException('Cannot delete this template because it is locked'); } }