コード例 #1
0
    } else {
        if ($type === 'isi') {
            $gamedev->get_api_others($options);
        } else {
            $gamedev->get_api_results($options);
        }
    }
});
// POST route
$app->post('/formulir/post', function () {
    $gamedev = new GameDev();
    $gamedev->save_users_inputs();
});
$app->post('/formulir/kunci', function () {
    $gamedev = new GameDev();
    $gamedev->save_users_key_request();
});
// PUT route
$app->put('/put', function () {
    echo 'This is a PUT route';
});
// PATCH route
$app->patch('/patch', function () {
    echo 'This is a PATCH route';
});
// DELETE route
$app->delete('/delete', function () {
    echo 'This is a DELETE route';
});
/**
 * Step 4: Run the Slim application