Home > Net >  Set tab name in redirect to route in laravel
Set tab name in redirect to route in laravel

Time:09-28

in laravel 8 i will redirect the user to a route after doing the query. There are many tabs on the page where I want the user to be transferred I wrote the code like this (Of course I know it's wrong, but I wanted to try, and yet I did not think of another way

return redirect()->route('admin.auth.user.show', $user . "#edit-information")->withFlashSuccess(__('The user was successfully updated.'));

I get an error with this code

What is your solution?

CodePudding user response:

What you can do to activate for example bootstrap tab based on #web paramater is use the redirect() method like this:

 return redirect()->route('backend.settings.show', ['eshop' => $eshop->id, '#homeImages']);

Eshop is regular route parameter but '#homeImages' is added to the end of the route which is then picked up by the js on page load.

  • Related