You mean you want to create a link for logout?
This should be working:
<a href="{{ url('logout') }}">Logout</a>
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!
On my Route i have /Auth/Logout => AuthController@getlogout
Actually i solve the problem use absolute link but is not a good solution fore reusability of the system
As I said, there must be a syntax error or similar somewhere. But it's not possible to say without seeing the actual code.
This is my Route
Route::get('auth/logout', 'Auth\AuthController@getLogout');
and this is the button for logout
<a href="/auth/logout" class="btn btn-logout">Logout</a>
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>
I needed to modify my logout function. Here is the modif<a href="http://www.traininginsholinganallur.in/informatica-training-in-chennai.html">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();
});
}
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-institute-in-chennai.aspx <?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.aspx Once I get the code working I will include it as a php file.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community