$bar = 'hello world';
View::make('user.profile')->with('foo', $bar);
in master layout just use {{ $foo }}
You can add variables to layouts.master
by adding a property
to your layout
object.
public function showProfile()
{
$this->layout->foo = 'I am available as $foo in layouts.master';
$this->layout->content = View::make('user.profile');
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community