Download public/api/categorias.php from chartManD/turitezo: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/spaces/chartManD/turitezo/resolve/main/public/api/categorias.php
- Command line
-
hf download hf://spaces/chartManD/turitezo/public/api/categorias.php
-
curl -L -o categorias.php https://huggingface.co/spaces/chartManD/turitezo/resolve/main/public/api/categorias.php
512 Bytes
| require_once "../../controllers/controller_category.php"; | |
| $objConCategory = new ControllerCategoria(); | |
| $categories = $objConCategory->getAllCategories(); | |
| if (isset($categories["message"])) { | |
| echo json_encode($categories); | |
| die(); | |
| } else { | |
| $listOfCategorys = array(); | |
| foreach ($categories as $category) { | |
| array_push($listOfCategorys, $category->getAtributs()); | |
| } | |
| header('Content-Type: application/json; charset=UTF-8'); | |
| echo json_encode($listOfCategorys); | |
| die(); | |
| } |