Laravel 5 - 实施 Flash 消息示例不起作用
Laravel 5 - Implement Flash Messages with example not working
我在 post 此处 http://itsolutionstuff.com/post/laravel-5-implement-flash-messages-with-exampleexample.html 和 第 3 步:使用带有重定向的 flash 消息 我已经更改了它所以它调用我的 HomeController.php 文件中的以下方法:
public function index(Request $request) {
return view("home")->with("info", "Please note that although Transport for South Africa is updated regularly, the site is still in BETA, and I'm hoping to have it complete by the 1st January 2018.");
}
正如您在示例中看到的,您必须执行重定向才能使用 flash 消息(例如,使用 back()
或 redirect()
助手)。
它们在下一个请求中可见,而不是当前请求。
我在 post 此处 http://itsolutionstuff.com/post/laravel-5-implement-flash-messages-with-exampleexample.html 和 第 3 步:使用带有重定向的 flash 消息 我已经更改了它所以它调用我的 HomeController.php 文件中的以下方法:
public function index(Request $request) {
return view("home")->with("info", "Please note that although Transport for South Africa is updated regularly, the site is still in BETA, and I'm hoping to have it complete by the 1st January 2018.");
}
正如您在示例中看到的,您必须执行重定向才能使用 flash 消息(例如,使用 back()
或 redirect()
助手)。
它们在下一个请求中可见,而不是当前请求。