public function __construct(Application $app, Filesystem $files, Dispatcher $events, Translation $translation) { $this->app = $app; $this->files = $files; $this->events = $events; $this->translation = $translation; $this->persistentPrefix = null; $this->cache = null; // when instantiated from the service provider, config info is not yet loaded, trying to get it here // causes a problem since none of the keys are defined. $this->config = null; $manager = $this; Route::after(function () use($manager) { $manager->saveCache(); }); }