<?php use Baobab\Helper\Views; use Balsa\Controllers\DefaultController; Views::render((new DefaultController())->singlePost());
/** * For themes properly structured, we can find the search form template at * app/views/parts/misc/search-form.php. We'll also try a blade template if possible. In order, the templates which * will be tried will be: * * /my-theme/app/views/parts/misc/search-form.blade.php * /my-theme/app/views/parts/search-form.blade.php * /my-theme/app/views/parts/misc/search-form.php * /my-theme/app/views/parts/search-form.php * /my-theme/searchform.php * * @param $form The search form * * @return string */ public function suggestMoreSearchFormTemplates($form) { ob_start(); // Try a blade template first and if not found, try standard PHP templates $template = Views::pickView(array('parts.misc.search-form', 'parts.search-form')); if ($template != null) { Views::render(Baobab::blade()->view()->make($template)); } else { locate_template(array('/app/views/parts/misc/search-form.php', '/app/views/parts/search-form.php', 'searchform.php'), true, false); } $form = ob_get_clean(); return $form; }
<?php use Baobab\Helper\Views; use Balsa\Controllers\DefaultController; Views::render((new DefaultController())->error404());
<?php use Baobab\Helper\Views; use Balsa\Controllers\DefaultController; Views::render((new DefaultController())->index());