Ejemplo n.º 1
0
});
$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);
});
$route->respond('GET', '/dashboard/leave/index', function ($request, $response) use($leave) {
    return $leave->index($request, $response);
});
$route->respond('GET', '/dashboard/leave/create', function ($request, $response) use($leave) {
    return $leave->create($request, $response);
});
$route->respond('POST', '/dashboard/leave/create', function ($request, $response) use($leave) {
    return $leave->store($request, $response);
});
$route->respond('GET', '/dashboard/leave/approve/[i:id]', function ($request, $response) use($leave) {
    return $leave->approve($request, $response);
});
// $rotue->respond('GET', '/posts', $callback);
// $rotue->respond('POST', '/posts', $callback);
// $rotue->respond('PUT', '/posts/[i:id]', $callback);
// $rotue->respond('DELETE', '/posts/[i:id]', $callback);
// $rotue->respond('OPTIONS', null, $callback);
$route->dispatch();