title: Convert html block to image in laravel
body: <p>I am creating a html code by sending an ajax request.</p>
  
  <p><code>Ajax script</code></p>
  
  <pre><code>$.ajax({
      url: "{{url('/')}}/phpScript", //Server script to process data
      type: 'POST',
      dataType: 'json',
      data: data, //this is an object with all my required variables
      success: function (html) {
          if (html) {
              $('#someTag').html(html); //change the html of #someTag with new html   
          }
      }
  
  });
  </code></pre>
  
  <p><code>PHP Script</code>:</p>
  
  <pre><code>static function createHtml() {
      ob_start(); ?&gt;
          &lt;div class="large-12 medium-12 columns" id="certificate-holder"&gt;
              &lt;div class="middle-wrappe"&gt;
                 &lt;?php //some other code here to create the html ?&gt;
              &lt;/div&gt;
              &lt;style&gt;/** some style here**/&lt;/style&gt;
          &lt;/div&gt;
  
  
      &lt;?php return ob_get_clean();
  }
  </code></pre>
  
  <p><code>This is working fine and I am able to create html and change the html with new html.</code></p>
  
  <p><strong>Is there any way to create the image of that html block, so that I can return the image back and show the image in that #someTag instead of the html.</strong></p>
  
  <p>I have used <code>anam/phantommagick</code> to create image from html, but in this I need to pass the url of page to create image.</p>
  
  <p>Thanks</p>