Primera parte de inicio
This commit is contained in:
18
common/Controller/Web/Base.php
Normal file
18
common/Controller/Web/Base.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user