Closed nhim175 closed 9 years ago
namespace App\Http\Controllers\Demo;
use App\Http\Controllers\Controller;
use Teepluss\Theme\Contracts\Theme;
class ThemeController extends Controller
{
public function __construct(Theme $theme)
{
$this->theme = $theme->uses('default');
}
public function getIndex()
{
return $this->theme->scope('theme.index')->render();
}
}
I followed the example in Using theme global section.
Whenever I create a subclass of BaseController class, seems like I have to do something like this:
Is there any better way?