对于重定向,在控制器中,我们可以这样写:-
Redirect::Route('front_index')->with('RegError', 'An error occured while adding the user.');
如何设置锚标记的href
,以便也可以发送“ RegError”?这样说吧?
<a href="{{route('front_index')->with('RegError', '')}}">
答案 0 :(得分:2)
实际上您不能这样做,因为with
函数用于将参数从控制器传递到视图,并且route
助手没有这种方法。
您需要提出请求,并在控制器中通过RegError