Mostrar reservas
This commit is contained in:
22
app/src/Controller/Ventas/Reservations.php
Normal file
22
app/src/Controller/Ventas/Reservations.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Incoviba\Controller\Ventas;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Incoviba\Common\Alias\View;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
|
||||
class Reservations
|
||||
{
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response,
|
||||
Service\Proyecto $proyectoService, View $view): ResponseInterface
|
||||
{
|
||||
$projects = [];
|
||||
try {
|
||||
$projects = $proyectoService->getVendibles('descripcion');
|
||||
} catch (EmptyResult) {}
|
||||
return $view->render($response, 'ventas.reservations', compact('projects'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user