diff --git a/Router/Router.php b/Router/Router.php index 185b55a87..99db64121 100644 --- a/Router/Router.php +++ b/Router/Router.php @@ -54,15 +54,21 @@ class Router * * @param string $path Route file path * - * @return void + * @return bool * * @since 1.0.0 * @author Dennis Eichhorn */ - public function importFromFile(string $path) + public function importFromFile(string $path) : bool { - /** @noinspection PhpIncludeInspection */ - $this->routes += include $path; + if(file_exists($path)) { + /** @noinspection PhpIncludeInspection */ + $this->routes += include $path; + + return true; + } + + return false; } /**