diff --git a/src/Http/Controllers/LegacyController.php b/src/Http/Controllers/LegacyController.php index 9e282de..f66ef18 100644 --- a/src/Http/Controllers/LegacyController.php +++ b/src/Http/Controllers/LegacyController.php @@ -24,7 +24,7 @@ public function __invoke(Request $request, $file) $file = base_path(config('legacy-loader.file_path') . $this->getCleanPath($request->path())); - if (! str_contains($request->path(), '.php')) { + if (!str_contains($request->path(), '.php')) { $file = str_replace(['.html', '.php', '.txt'], '', $file) . '.php'; } if (file_exists($file)) { @@ -32,12 +32,13 @@ public function __invoke(Request $request, $file) require_once($file); // return new Response(ob_get_clean()); - } + } else { - /** - * Todo: Exceptions - */ - abort(404); + /** + * Todo: Exceptions + */ + abort(404); + } } protected function getCleanPath(string $path)