2 years ago

Redirect problem

Posted 2 years ago by djay


I have user profile page which is visible to guest users (without login)

I have "Like" button on profile page.

authenticated user can "Like" the profile directly by like button

But for guest users I want to redirect to login page:

        <a class="btn btn-info" href="{{ url('login') }}">Login to continue</a>
    <form class="form-inline">
            <input type="hidden" id="userId" value="{{$user->id}}">
            <button class="btn btn-info" id="ajaxLike"><i class="fa fa-thumbs-up" style="font-size:16px"></i>   Like</button>

and after login I want it to redirect back to profile page.

But after logging in- it redirects to dashboard and not to profile page

How can I do this???

Thanks in advance

Please sign in or create an account to participate in this conversation.