title: Laravel view, layout and variables transfer
body: <p>my laravel view structure is like this:</p>
  
  <pre><code> /views/layouts/default.blade.php
  </code></pre>
  
  <p>containing </p>
  
  <pre><code>&lt;html&gt;
  @yield('header')
  &lt;body&gt;
      @yield('navigation')
      @yield('content')
      @yield('footer')
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>following by</p>
  
  <pre><code>/views/partials/footer.blade.php
  /views/partials/header.blade.php
  /views/partials/navigation.blade.php
  </code></pre>
  
  <p>In my header view i have a var $title
  I'm trying to set it dynamically trought the controller on the home page.</p>
  
  <p>so in my view located in /pages/index.blade.php
  I got this     </p>
  
  <pre><code>@layout('layouts.default')
  @section('header')
    @render('partials.header')
  @endsection
  
  @section('navigation')
    @render('partials.menu')
  @endsection
  
  @section('footer')
    footer
  @endsection
  
  @section('content')
  @endsection
  </code></pre>
  
  <p>I read somewhere that the title var should be passed throught the controller but i can't do it :(</p>
  
  <p>i tried this without any success.$title is undefined in header partials views..</p>
  
  <pre><code>class Home_Controller extends Base_Controller {
      public $layout = 'layouts.default';
      public function action_index()
      {
          $this-&gt;layout-&gt;nest('header', 'home.index')-&gt;with('title', 'James');
          $posts = Post::with('author')-&gt;all();
          return View::make('home.index');
  
      }
  </code></pre>