title: Laravel View Composer "Use of undefined constant"
body: <p>been looking all evening and it all seems so easy and simple but just won't work!</p>
  
  <p>Just starting out and trying to get a variable into a view.</p>
  
  <p>Whatever i do, i can't seem to read it.</p>
  
  <p>routes.php:</p>
  
  <pre><code>Route::get('/', function()
  {
      return View::make('dashboard');
  });
  
  View::composer('dashboard', function($view) {
      $view-&gt;with('links', "something");
  });
  </code></pre>
  
  <p>dashboard.blade.php:</p>
  
  <pre><code>@extends('base_view')
  
  @section('content')
      All the stuff!
      {{links}}
  @stop
  </code></pre>
  
  <p>base_view.blade.php</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Laravel PHP Framework&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;TeamPro&lt;/div&gt;
      &lt;div&gt;@yield('content')&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please tell me i'm just doing something stupid!</p>