From 0c4bb92da8cf23a47db2d93776f33f610eccc22d Mon Sep 17 00:00:00 2001 From: inmanturbo <47095624+inmanturbo@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:34:33 -0400 Subject: [PATCH] Update LegacyController.php --- src/Http/Controllers/LegacyController.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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)