Hello I have the following problem: I load the main layout (view) of the site in the renderOutput method which is written on the parent controller SiteController.

protected function renderOutput() { $menu = $this->getMenu(); $navigation = view(env('THEME').".navigation")->with('menu',$menu)->render(); $this->vars = array(); $this->vars = array_add($this->vars,'navigation', $navigation); return view($this->template)->with($this->vars); } 

And in the child controller IndexController in the index method, I call this method. And also to display the section (section) sliders in the index method, I pass the $ sliders variable to the address of the slider template.

 public function index() { // $sliders = view(env('THEME').".slider")->render(); $this->vars = array(); $this->vars = array_add($this->vars,'sliders',$sliders); return $this->renderOutput(); } 

But when I use this variable in the template, I get an error. That is, the $ sliders variable is not available in the template. Please tell me how to solve the problem. Thank you in advance!

    0