Support the ongoing development of Laravel.io →
Installation Configuration Views

Just installed laravel 4 trying it out seeing if it has some better features than codeigniter. Just new to laravel 4

Query:

Can I load a controller as a data array

or do something like this $data[header] => $this->load->controller(common/header);

in view file can I echo data

<?php echo $header ;?> <div id="content"> </div> <?php echo $footer ;?>
Last updated 3 years ago.
0

smth like this...

public function test(){

    return View::make('yourView',array('header'=>'blalalala'));

   }

here's a simple step doing dynamic layout : here

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.