Make index page files available at / route

This commit is contained in:
Giuseppe Criscione 2019-03-18 19:40:21 +01:00
parent bdd5a0198c
commit 854e058500

View File

@ -214,6 +214,9 @@ class Formwork
} else {
$filename = basename($route);
$upperLevel = dirname($route);
if ($upperLevel === '.') {
$upperLevel = $this->option('pages.index');
}
if ($parent = $this->site->findPage($upperLevel)) {
if ($file = $parent->file($filename)) {
return HTTPResponse::file($file);