Skip to content
Advertisement

how to get laravel to get back to the profile page after follow/unfollow happens

I am developing a social network website and one of the functions is followed and unfollow that get you to follow/unfollow another user on the website, I want to know how to make Laravel go back to the profile page after the follow or unfollow happened, is there is a way that I can redirect to the profile controller with the id of the user I just follow/unfollow because that is what the profile controller requires to get the data of the user.

The Following Controller

JavaScript

Get Profile Controller

JavaScript

web.php

JavaScript

TLDR:- I want to get back to the profile page of the user I just follow or unfollow

Advertisement

Answer

There are so many ways to do it with laravel but one the best is:

JavaScript

you can use Laravel wildcard

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement