33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
namespace ProVM\NotariaRaby\Common\Controller\Web;
|
|
|
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
|
use Psr\Http\Message\ResponseInterface as Response;
|
|
use Slim\Views\Blade as View;
|
|
|
|
class Contacto {
|
|
public function __invoke(Request $request, Response $response, View $view): Response {
|
|
$google = (object) [
|
|
'api' => ''
|
|
];
|
|
$map = (object) [
|
|
'lat' => -33.415938,
|
|
'long' => -70.591688
|
|
];
|
|
$url = 'https://www.google.com/maps/embed/v1/place?q=notaria+patricio+raby&key=AIzaSyBFw0Qbyq9zTFTd-tUY6dZWTgaQzuU17R8';
|
|
$url = 'https://maps.google.com/maps?hl=es&q=Notaria%20Patricio%20Raby+(Notaria%20Patricio%20Raby)&ie=UTF8&z=16&iwloc=B&output=embed';
|
|
return $view->render($response, 'contacto', compact('url'));
|
|
}
|
|
public function formulario(Request $request, Response $response): Response {
|
|
$post = $request->getParsedBody();
|
|
|
|
$output = [
|
|
'informacion' => $post
|
|
];
|
|
$response->getBody()->write(json_encode($output));
|
|
return $response
|
|
->withHeader('Content-Type', 'application/json')
|
|
->withStatus(201);
|
|
}
|
|
}
|