Fix #2386 layout not visible if only layout.blade.php exists

This commit is contained in:
Kijin Sung 2024-07-29 23:32:04 +09:00
parent 2b23bc522d
commit 5ed8ef5ef1

View file

@ -249,7 +249,18 @@ class LayoutModel extends Layout
$path = $pathPrefix . $layout;
}
return is_readable($path . '/layout.html');
if (file_exists($path . '/layout.html') && is_readable($path . '/layout.html'))
{
return true;
}
elseif (file_exists($path . '/layout.blade.php') && is_readable($path . '/layout.blade.php'))
{
return true;
}
else
{
return false;
}
}
/**