Use the laravel-admin framework as the backend, hoping to jump to the specified url after the form is submitted successfully. The code is as follows:
$form->saved(function (Form $form) use($pid2) {
// 跳转页面
return redirect('/admin/page/' . $pid2 . '#tab_9');
});
The problem is: the url after the jump becomes '/admin/page/' . $pid2, and the following #tab_9 is deleted, but I need to keep it. How to deal with it?
The following is the anchor point. It is normal not to be displayed in the URL. You can use document.URL to obtain it in the front-end JS and you can get #tab_9
In the end, I changed the method (using js to read the data in the page and jump to the url). I haven’t tried the above answer, but thank you for your answer.