turitezo / public /api /detalles-lugar.php
chartManD's picture
App rutes API from local project
06b0d81
raw
history blame contribute delete
435 Bytes
<?php
$noId = ["message" => "Error en la espcificacion del lugar"];
if (!isset($_GET["id_lugar"])) {
echo json_encode($noId);
die();
}
$idLugar = intval($_GET["id_lugar"], 10);
if (!$idLugar) {
echo json_encode($noId);
die();
}
require_once "../../controllers/controller_place.php";
$objConPlace = new ControllerPlace();
$allDetails = $objConPlace->getDetailsPlace($idLugar);
echo json_encode($allDetails);
die();