You are looking for View
actually Illuminate/View/Environment.php
:
<!-- layuts/mastrer.php -->
<body>
<?php echo View::yieldContent('content'); ?>
</body>
<!-- views/home/index.php -->
<?php View::startSection('content'); ?>
<?php echo 'Welcome ' . $name; ?>
<?php View::stopSection(); ?>
BaseController class:
protected $layout = 'layouts.master';
protected function setupLayout()
{
if ( ! is_null($this->layout))
{
$this->layout = View::make($this->layout);
}
}
HomeController class:
public function ShowHome()
$this->layout->title = 'Laravel -> Lout';
$this->layout->content = View::make('home.index', ['name' => 'Sheikh Heera']);
}
But, if you use these functions then why not just use the blade
?