igaster/laravel-theme

5.4 -> 5.5 update issue

Closed this issue · 2 comments

Call to undefined method Illuminate\View\FileViewFinder::setPaths()

Error in: /vendor/igaster/laravel-theme/src/Themes.php

        if($this->exists($themeName)){
            $theme = $this->find($themeName);
        } else {
            $theme = new Theme($themeName);
        }
 
        $this->activeTheme = $theme;
 
        // Get theme view paths
        $paths = $theme->getViewPaths();
 
        // fall-back to default paths (set in views.php config file)
        foreach ($this->laravelViewsPath as $path)
            if(!in_array($path, $paths))
                $paths[] = $path;
 
        Config::set('view.paths', $paths);
 
        $themeViewFinder = app('view.finder');
        $themeViewFinder->setPaths($paths);
 
        Event::fire('igaster.laravel-theme.change', $theme);
        return $theme;
    }
 
    /**
     * Get current theme
     * 
     * @return Theme
     */
    public function current(){
        return $this->activeTheme ? $this->activeTheme : null;
    }

Hello @SolStis86, thank you for your report and pull request.

Did you upgraded from v1.x branch? You could receive this error if you have not switched to the new namespace...

Just checking some possibilities...

Definitely running the new namespace