diff --git a/resources/routes/web.php b/resources/routes/web.php index eaff353..192102c 100644 --- a/resources/routes/web.php +++ b/resources/routes/web.php @@ -5,12 +5,14 @@ $folder = implode(DIRECTORY_SEPARATOR, [ __DIR__, 'web' ]); -$files = new DirectoryIterator($folder); -foreach ($files as $file) { - if ($file->isDir()) { - continue; +if (file_exists($folder)) { + $files = new DirectoryIterator($folder); + foreach ($files as $file) { + if ($file->isDir()) { + continue; + } + include_once $file->getRealPath(); } - include_once $file->getRealPath(); } $app->get('/', Base::class);