首页 > 解决方案 > 如何在laravel中显示一些特殊字符的消息

问题描述

我想显示我已经显示的成功和错误绿色/红色的消息,但是我遇到了问题

当我输入一些其他一些特殊字符的消息时

return \Illuminate\Support\Facades\Redirect::to('')
                    ->with("modal_message_danger", "Heslo, které jste zadali, je neplatné.");

它只显示红色的错误栏,而不是写在里面的消息“Heslo, které jste zadali, je neplatné”。

但是当我输入英语时,例如:

return \Illuminate\Support\Facades\Redirect::to('')
              ->with("modal_message_danger", "password change is incorrect")

它成功地向我显示了错误消息。

这里发生了什么我需要你的帮助。您的帮助将不胜感激!

@if ($message = \Illuminate\Support\Facades\Session::get('modal_message_danger'))
                  <div class="alert alert-danger alert-block">
                        <button type="button" class="close" data-dismiss="alert">×&lt;/button>
                        <span>{{ $message }}</span>
                   </div>
@endif

标签: phplaravelmessaging

解决方案


推荐阅读