diff --git a/src/Illuminate/Filesystem/FilesystemServiceProvider.php b/src/Illuminate/Filesystem/FilesystemServiceProvider.php index a6ad8e1a7b34..28fe5f60b23a 100644 --- a/src/Illuminate/Filesystem/FilesystemServiceProvider.php +++ b/src/Illuminate/Filesystem/FilesystemServiceProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\Filesystem; +use Illuminate\Contracts\Foundation\CachesRoutes; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; @@ -78,7 +79,7 @@ protected function registerManager() */ protected function serveFiles() { - if ($this->app->routesAreCached()) { + if ($this->app instanceof CachesRoutes && $this->app->routesAreCached()) { return; }