file($candidate); } } $index = $adminBase.DIRECTORY_SEPARATOR.'index.html'; if (! is_file($index) || ! is_readable($index)) { abort(503, 'Admin index.html is missing or unreadable.'); } $html = @file_get_contents($index); if ($html === false) { abort(503, 'Cannot read admin index.html.'); } return response($html, 200, [ 'Content-Type' => 'text/html; charset=UTF-8', ]); })->where('path', '.*');