mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 21:45:55 +00:00
wip
This commit is contained in:
@@ -26,12 +26,13 @@ abstract class Controller implements HttpServerInterface
|
||||
{
|
||||
}
|
||||
|
||||
protected function getView(string $view, array $data)
|
||||
protected function getView(string $view, array $data = [])
|
||||
{
|
||||
$templatePath = implode(DIRECTORY_SEPARATOR, explode('.', $view));
|
||||
|
||||
$twig = new Environment(
|
||||
new ArrayLoader([
|
||||
'app' => file_get_contents(base_path('resources/views/server/layouts/app.twig')),
|
||||
'template' => file_get_contents(base_path('resources/views/'.$templatePath.'.twig')),
|
||||
])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user