Files
KI/common/Controller/Web/Base.php

19 lines
684 B
PHP
Raw Normal View History

2020-04-30 08:31:19 -04:00
<?php
namespace ProVM\KI\Common\Controller\Web;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Slim\Views\Blade as View;
use Psr\Container\ContainerInterface as Container;
use Carbon\Carbon;
class Base {
public function __invoke(Request $request, Response $response, View $view, Container $container) {
$valor_uf = number_format(25000, 2, ',', '.');
$fecha = ucwords(Carbon::today()->locale('es')->isoFormat('D MMMM'));
$hora = Carbon::now()->format('H:i a');
$visitas = $container->get('visitas');
return $view->render($response, 'home', compact('valor_uf', 'fecha', 'hora', 'visitas'));
}
}