- or download this
function do_logout() {
$.post( "<%= url_for('on_logout') %>", function() {});
}
- or download this
$if_login->post('/logout')->name('on_logout')->to('user#on_logout');
- or download this
sub on_logout {
my $self = shift;
$self->session(expires => 1);
return $self->redirect_to('home');
}