title: Blade, parse variable from within a string
body: <p>I would like to achieve something like this: </p>
  
  <pre><code>$data['username'] = "John";
  $data['msg'] = "Hey {{$username}}, blab blab blab";
  View::make('view.name')-&gt;with($data);
  
  // Blade
  
  {{ $msg }}
  
  // Prints
  Hey John, blab blab blab
  </code></pre>
  
  <p>Any ideas on how to go about that?</p>
  
  <p><strong>EDIT:</strong>
  I am trying to achieve "mailchimp" like messaging system, where the user (this is only admin side and so far admin is just me so I can overlook a couple of security checks here) can add variables (which i know will be available within view scope) to the message body. I am using this for support, so for instance I might want to send a link to a user's profile : </p>
  
  <pre><code>Hey {{first_name}},
  
  This is a link to your profile: &lt;a href="/users/{{user_guid}}"&gt;profile&lt;/a&gt;
  </code></pre>
  
  <p>So that means that there might or might not be variable within the message body.</p>
  
  <p>EDIT:
  the close i got is with (that might help understand what i am trying to do) :</p>
  
  <pre><code>// These variable are not hard coded here, I just had them to indicate that they will be in view scope
  $data['username'] = "John";
  $data['msg'] = "Hey {{$username}}, blab blab blab";
  
  // I can only know for sure that 'msg' will be defined and that it may or may not contain over variables
  $data['msg'] = Blade::compileString($data['msg']);
  View::make('view.name')-&gt;with($data);
  
  // Blade
  
  {{ $msg }}
  
  // Prints
  Hey John, blab blab blab
  </code></pre>