Support the ongoing development of Laravel.io →
Authentication
Last updated 2 weeks ago.
0

You mean you want to create a link for logout?

This should be working:

<a href="{{ url('logout') }}">Logout</a>
0

I try also this solution, but when i click the Logout button, if i'm in page mysite.com/page1/innerpage , then i have as result mysite.com/page1/auth/logout instead of mysite.com/auth/logout so didn't work!

0

You must have an error with your routing then

0

On my Route i have /Auth/Logout => [email protected]

Actually i solve the problem use absolute link but is not a good solution fore reusability of the system

0

As I said, there must be a syntax error or similar somewhere. But it's not possible to say without seeing the actual code.

0

This is my Route

Route::get('auth/logout', 'Auth\[email protected]');

and this is the button for logout

<a href="/auth/logout" class="btn btn-logout">Logout</a>

Last updated 6 years ago.
0

That url is hardcoded to a relative path, that's why. Change it to

<a href="{{ url('auth/logout') }}" class="btn btn-logout">Logout</a>
0

Thank you very much!

0

I needed to modify my logout function. Here is the modif<a href="http://www.traininginsholinganallur.in/informatica-training-in...">i</a>ed function.

function logout(response){ console.log("From logout" + response); if(!response.authResponse){ window.location = "/web/login/"; return; }

       FB.logout(function(response){
           FB.Auth.setAuthResponse(null,'unknown');  
             logout();
       });
    }
Last updated 6 years ago.
0

When i tried to move the login / logout links from the main navbar to the very top of the page like to the top of this forum, so to do this I have included the following code in the main.tpl file but it doeskin work... help would be appreciated. http://www.traininginchrompet.com/informatica-training-institu... <?php if ($pun_user['is_guest']) { $links[] = '<div id="navlogintop"'.((PUN_ACTIVE_PAGE == 'login') ? ' class="isactive"' : '').'><a href="login.php">'.$lang_common['Login'].'</a></div>'; $links[] = '<div id="navregistertop"'.((PUN_ACTIVE_PAGE == 'register') ? ' class="isactive"' : '').'><a href="register.php">'.$lang_common['Register'].'</a></div>'; } else { $links[] = '<div id="navlogouttop"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.pun_hash($pun_user['id'].pun_hash(get_remote_address())).'">Logout</a></div>'; $links[] = '<div id="navprofiletop"'.((PUN_ACTIVE_PAGE == 'profile') ? ' class="isactive"' : '').'><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a></div>'; } ?> http://www.traininginchrompet.com/android-training-in-chennai.... Once I get the code working I will include it as a php file.

0

Sign in to participate in this thread!

Cloudways

Your banner here too?

Latoweb Latoweb latoweb Joined 28 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.