title: Is there any way to compile a blade template from a string?
body: <p>How can I compile a blade template from a string rather than a view file, like the code below:</p>
  
  <pre><code>&lt;?php
  $string = '&lt;h2&gt;{{ $name }}&lt;/h2&gt;';
  echo Blade::compile($string, array('name' =&gt; 'John Doe')); 
  ?&gt;
  </code></pre>
  
  <p><a href="http://paste.laravel.com/ujL" rel="noreferrer">http://paste.laravel.com/ujL</a></p>