'; foreach ($message as $key => $value) { $string .= '
  • ' . ucfirst($value) . '
  • '; } $string .= ''; } else { $string = ucfirst($message); } $alert = ''; return $alert; } /**summernote */ public static function input_summernote($value) { libxml_use_internal_errors(true); $dom = new \DomDocument(); $dom->loadHtml($value, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $images = $dom->getElementsByTagName('img'); if (!empty($images)) { foreach ($images as $k => $img) { $data = $img->getAttribute('src'); list($type, $data) = explode(';', $data); list(, $data) = explode(',', $data); $data = base64_decode($data); $image_name = "/summernote/images/" . Carbon::parse(NOW())->format('d-m-Y-His') . $k . '.png'; $path = public_path() . $image_name; file_put_contents($path, $data); $img->removeAttribute('src'); $img->setAttribute('src', $image_name); } } $value = $dom->saveHTML(); return $value; } public static function parsing_alert($message) { $string = ''; if (is_array($message)) { foreach ($message as $key => $value) { $string .= ucfirst($value) . '
    '; } } else { $string = ucfirst($message); } return $string; } public static function warning_alert($message) { $string = ''; if (is_array($message)) { foreach ($message as $key => $value) { $string .= '
  • ' . ucfirst($value) . '
  • '; } $string .= ''; } else { $string = ucfirst($message); } $alert = ''; return $alert; } public static function failed_alert($message) { $string = ''; if (is_array($message)) { $string = '