From d62b75bbca162853688fbbc5d51e754cb7a6405f Mon Sep 17 00:00:00 2001 From: scrapewww <30661012+scrapewww@users.noreply.github.com> Date: Wed, 9 Aug 2017 00:20:20 -0400 Subject: [PATCH] Laravel 5.4 FatalThrowableError Exception Fix Fixed FatalThrowableError Exception thrown in Laravel 5.4. "Call to undefined method Illuminate\Routing\Route::getPath()" --- src/Commands/CrawlRoutes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/CrawlRoutes.php b/src/Commands/CrawlRoutes.php index b4459fa..92ae07b 100644 --- a/src/Commands/CrawlRoutes.php +++ b/src/Commands/CrawlRoutes.php @@ -84,7 +84,7 @@ public function crawl() foreach ($routeCollection as $route) { $limit = config('restricted.index_level') ?: 1; - $paths = explode('/', $route->getPath()); + $paths = explode('/', $route->uri()); foreach ($paths as $i => $path) { if($i >= $limit) @@ -117,4 +117,4 @@ function store($routes){ fwrite($file, $input); fclose($file); } -} \ No newline at end of file +}