有时你可能希望暂存一些数据,并只在下次请求有效。你可以使用 Session::flash 方法来达成目的:
Session::flash
Session::flash("key", "value");
Session::reflash();
Session::keep(["username", "email"]);