Se agregan archivos a todo lo modificable

This commit is contained in:
2020-05-26 23:04:37 -04:00
parent c8ceba4776
commit d0aba43371
11 changed files with 76 additions and 127 deletions

View File

@ -9,7 +9,6 @@ use Carbon\Carbon;
class Base {
public function __invoke(Request $request, Response $response, View $view, Container $container) {
$aviso = true;
$filename = implode(DIRECTORY_SEPARATOR, [
$container->get('folders.data'),
'avisos.json'
@ -32,7 +31,12 @@ class Base {
}
$item->imagen = '<img src="' . $container->get('urls')->images . '/' . $item->imagen . '" />';
});
$filename = implode(DIRECTORY_SEPARATOR, [
$container->get('folders.data'),
'resumen.json'
]);
$resumen = json_decode(trim(file_get_contents($filename)));
$indicadores = ['uf' => 'UF', 'euro' => 'Euro', 'imacec' => 'IMACEC', 'dolar' => 'USD', 'ipc' => 'IPC', 'utm' => 'UTM', 'bitcoin' => 'BitCoin', 'libra_cobre' => 'Lb. Cu'];
return $view->render($response, 'home', compact('aviso', 'avisos', 'destacados', 'segmentos', 'indicadores'));
return $view->render($response, 'home', compact('aviso', 'avisos', 'destacados', 'segmentos', 'resumen', 'indicadores'));
}
}