pingpong-labs / themes

Laravel 5 Themes
https://pingpong-labs.github.io/docs/themes.html
BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

Laravel 5.1 - Call to undefined method Pingpong\Themes\Theme::view() #8

Closed ChristopherDosin closed 9 years ago

ChristopherDosin commented 9 years ago

I tried to get your theme working, but i get everytime the above error.

 public function index()
    {
        return Theme::view('themes.default.views.index.index');
        //return view('themes.default.views.index.index');
    }

I also enabled the Theme image

If i look with tinker theres also no theme available

vagrant@homestead:~/Code/laravoice$ php artisan tinker
Psy Shell v0.5.2 (PHP 5.6.10-1+deb.sury.org~utopic+1 — cli) by Justin Hileman
>>> \Theme::all();
=> [
     Pingpong\Themes\Theme {#178},
   ]
ChristopherDosin commented 9 years ago

Okay got it with

use Pingpong\Themes\ThemeFacade as Theme;
...
return Theme::view('index.index'); // correct path relative from default theme root