Se agrega seccion de evento
This commit is contained in:
18
common/Controller/Web/Eventos.php
Normal file
18
common/Controller/Web/Eventos.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace ProVM\TotalSport\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Slim\Views\Blade as View;
|
||||
use ProVM\TotalSport\Common\Service\DataHandler;
|
||||
use ProVM\TotalSport\Common\Service\ImageLoader;
|
||||
|
||||
class Eventos {
|
||||
public function __invoke(Request $request, Response $response, View $view, DataHandler $handler, ImageLoader $loader, $evento): Response {
|
||||
$eventos = $handler->load('eventos');
|
||||
$e = $eventos[$evento];
|
||||
$imagenes = $loader->load($e);
|
||||
return $view->render($response, 'evento', ['evento' => $e, 'imagenes' => $imagenes]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user