Php Redirect::back()在laravel 5.4中不起作用

Php Redirect::back()在laravel 5.4中不起作用,php,laravel,laravel-5.4,Php,Laravel,Laravel 5.4,登录时,上述重定向::back()函数不起作用。 如果我正在打印它显示的任何内容您需要返回重定向您需要返回重定向要重定向,您必须使用laravel内置函数 if(count($data) == 1) { return view('home'); } else { // echo"ta-da"; Redirect::back()->with('message','username or password not Match!'); } 也可以使用route()方法instate of b

登录时,上述重定向::back()函数不起作用。
如果我正在打印它显示的任何内容

您需要
返回
重定向

您需要
返回
重定向

要重定向,您必须使用laravel内置函数

if(count($data) == 1)
{
return view('home');
}
else {
// echo"ta-da";
Redirect::back()->with('message','username or password not Match!'); 
}
也可以使用route()方法instate of back()方法


要重定向,必须使用laravel内置函数

if(count($data) == 1)
{
return view('home');
}
else {
// echo"ta-da";
Redirect::back()->with('message','username or password not Match!'); 
}
也可以使用route()方法instate of back()方法


在重定向前使用return重定向到路由

在重定向前使用return重定向到路由

return redirect::back()->带有('message'、'username或password not Match!')
return Redirect::back()->带有('message'、'username或password not Match!')谢谢saifur rahman,这是工作。谢谢你的支持。谢谢saifur rahman,这是工作。谢谢你的支持。
return redirect()->route('your.route.name')->with('msg_name', 'your message');