我使用“返回重定向()->route()”来路由,但是我有一个名为"#tab4“的选项卡,但不能用重定向()->route将其添加到url中。我想在提交后显示相同的选项卡,但不能设置我使用的重定向() url.when ()->back(),无法看到成功消息,并且页面不会重新设置。怎么用拉拉来做呢?
sessionsuccess("asdfghj.");
return redirect()->route('manage.customers.detail', ['account' => $this->account->id]);发布于 2021-12-28 07:44:12
web.php在途
Route::view('/#detail', 'manage.customers.detail/{account_id}')->name('detail');关于控制器
return redirect()->route("detail")->with("account_id"=>$this->account_id);试试这个,我相信做这个
发布于 2021-12-28 07:55:52
试着使用:
return redirect()->to(route('manage.customers.detail', ['account' => $this->account->id]).'#tab4');发布于 2021-12-28 09:00:02
将当前选项卡存储在会话变量中。加载视图后,可以使用会话并检索最后一个选项卡。
https://stackoverflow.com/questions/70504036
复制相似问题