This commit is contained in:
2021-03-25 23:33:37 -03:00
parent cd1ee7d446
commit 8fe357cc95
16 changed files with 216 additions and 58 deletions

11
setup/api/config.php Normal file
View File

@ -0,0 +1,11 @@
<?php
use Psr\Container\ContainerInterface as Container;
return [
'locations' => DI\decorate(function($prev, Container $c) {
$arr = (array) $prev;
$arr['cache'] = $prev->base . '/cache';
$arr['views'] = $prev->resources . '/views';
return (object) $arr;
})
];

15
setup/api/setups.php Normal file
View File

@ -0,0 +1,15 @@
<?php
use Psr\Container\ContainerInterface as Container;
return [
Slim\Views\Blade::class => function(Container $c) {
return new Slim\Views\Blade(
$c->get('locations')->views,
$c->get('locations')->cache,
null,
[
'locations' => $c->get('locations')
]
);
}
];