Skip to content

Instantly share code, notes, and snippets.

@JoaoVagner
Created July 11, 2017 14:08
Show Gist options
  • Save JoaoVagner/174e7849d50cee46c7cd0ce4ea78c17f to your computer and use it in GitHub Desktop.
Save JoaoVagner/174e7849d50cee46c7cd0ce4ea78c17f to your computer and use it in GitHub Desktop.
$this->get('/deleteall', function ($request, $response, $args) {
$params = $_GET;
$modelSkyhub = new ModelSkyhubCategories();
$categoriesSkyhub = $modelSkyhub->getCategories($params);
foreach ($categoriesSkyhub as $key => $category) {
$delete = $modelSkyhub->delete($category['code']);
flush();
ob_flush();
var_dump($category['code']);
// echo $delete;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment