Tutorialsplane

Laravel Load multiple views in same controller


Laravel Load multiple views in same controller : You can load multiple views in single controller function using the nest method. Here is simple example of loading multiple views from single controller method.


Laravel Load multiple views in same controller

You can load multiple views in laravel controller as below –

Laravel Load multiple views in same controller:

return View::make('header_template', $data)
->nest('left_content_view', $data2)
->nest('main_content_view', $data3)
->nest('right_content_view', $data4)
->nest('footer_template', $data5);

Thus you can load multiple views using the nest.

Laravel General

pagination

Laravel More