public function about(){
$tempPageID = Input::get('page_id');
$pageLayout = DB::table('tbl_page')->where('id',$tempPageID)->first();
$data = array(
'page' => $pageLayout
);
$layout = $pageLayout->page_layout;
$theme = Theme::uses('homepage')->layout('default',$data);
return $theme->of('layouts/'.$layout,$data)->render();
}
This my code in my HomeController that calls the page about. the thing is the first division of my page is only included in the layout 'default.blade.php' which is {{ Theme::partial('bannerForm') }}
I'm trying to make the content of the whole page dynamic but cant do it because I cant pass the $data to the bannerForm.blade.php the error is Undefined variable: page .
Does anyone encountered this problem? What can I do to make this work? My second plan is to put the whole bannerForm code in the layout 'default.blade.php' to make it simple but still the same error. Unlike the last line of code which works fine.