Skip to content

Instantly share code, notes, and snippets.

@MauMaGau
Created November 17, 2013 18:37
Show Gist options
  • Save MauMaGau/7516561 to your computer and use it in GitHub Desktop.
Save MauMaGau/7516561 to your computer and use it in GitHub Desktop.
Laravel view structure
// Controller
public function layout()
{
$tasks = array('hai');
$data = array(
'tasks' => $tasks,
);
return View::make('site_templates.default')
->nest('page_template','tasks.all', $data);
}
// site_templates/default.php
<?= View::make('site_elements/head') ?>
<?= $page_template ?>
<?= View::make('site_elements/foot') ?>
// tasks/all.php
<? var_dump($tasks) ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment