title: Laravel use blade directive inside php block
body: <p>I use Laravel 5.7, I created a Blade directive :</p>
  
  <pre><code>// create blade direct for prices
  Blade::directive('price', function ($money) {
      return "&lt;?php echo number_format($money, 2, ',', ' ') .' €'; ?&gt;";
  });
  </code></pre>
  
  <p>I can use it in my blade templates, like this :</p>
  
  <pre><code>&lt;span&gt;@price($product-&gt;price)&lt;/span&gt;
  </code></pre>
  
  <p>But how can I use it in php approach ? I have this code :</p>
  
  <pre><code>@include('emails.table', [
       __('order.reference') =&gt; $order-&gt;reference,
       __('order.total') =&gt; @price($order-&gt;total),
  ])
  </code></pre>
  
  <p>But it doesn't work :</p>
  
  <blockquote>
    <p>Call to undefined function price()</p>
  </blockquote>
  
  <p>I tried without <em>@</em> but no success. Must I use a kind of php helper for that ?</p>