logout() public method

Log the user out.
public logout ( )
Ejemplo n.º 1
0
});
$route->respond('GET', '/create', function () use($home) {
    return $home->create();
});
$route->respond('POST', '/store', function ($request, $response) use($home) {
    return $home->store($request, $response);
});
$route->respond('GET', '/login', function () use($home) {
    echo $home->getLogin();
    unset($_SESSION['flash']);
});
$route->respond('POST', '/login', function ($request, $response, $service) use($home) {
    return $home->postLogin($request, $response, $service);
});
$route->respond('GET', '/logout', function ($request, $response, $service) use($home) {
    return $home->logout($request, $response, $service);
});
$route->respond('GET', '/dashboard/index', function ($request, $response) use($dashboard) {
    return $dashboard->index($request, $response);
});
$route->respond('GET', '/dashboard/show', function ($request, $response) use($dashboard) {
    return $dashboard->show($request, $response);
});
$route->respond('GET', '/dashboard/delete/[i:id]', function ($request, $response) use($dashboard) {
    return $dashboard->delete($request, $response);
});
$route->respond('GET', '/dashboard/edit/[i:id]', function ($request, $response) use($dashboard) {
    return $dashboard->edit($request, $response);
});
$route->respond('POST', '/dashboard/edit/[i:id]', function ($request, $response) use($dashboard) {
    return $dashboard->update($request, $response);