laravel在重定向时不显示按摩

in my controller i have

//some actions
return redirect()->back()->with("msg", "ტური შენახულია");

in my blade template i have

    @if(isset($msg))
        <div class="alert alert-success"><strong>{{$msg}}</strong></div>
    @endif

but it doesnt display the massage. i also try this

return redirect()->back()->with(["msg", "ტური შენახულია"]);



$msg = "ტური შენახულია";
return redirect()->back()->with(compact("msg"));

but it doesnt display anyway

查看全部
dqcwl02022
dqcwl02022
2016/01/21 13:47
  • laravel
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复