refactor(view): remove redundant template path generation

- Remove unnecessary code that generates a template path based on the request pathinfo
- Simplify the render function by removing the conditional block that sets the template path
This commit is contained in:
wolfcode
2025-01-15 09:28:15 +08:00
parent 1e4486989a
commit 91eac36371

View File

@@ -133,9 +133,6 @@ class AdminController extends BaseController
{
if ($layout) View::instance()->engine()->layout('/layout/default');
View::assign($vars);
if (empty($template)) {
$template = strtolower(str_replace('.', '/', $this->request->pathinfo()));
}
return View::fetch($template);
}