title: How to upload canvas image to storage on Laravel
body: <p>I have small laravel project that need to upload file from canvas to storage/uploads/imgs. This is my canvas</p>
  
  <pre><code>&lt;body&gt;
      &lt;canvas id="canvas"&gt;&lt;/canvas&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I may need ajax for client as below</p>
  
  <pre><code>var canvas = document.getElementById('image');
      var dataURL = canvas.toDataURL();
  
  $.ajax({
      type: "POST",
      url: "/route-here",
      data: { 
          imgBase64: dataURL
      }
  }).done(function(o) {
      console.log('saved'); 
  });
  </code></pre>
  
  <p>But I'm not sure for coding in server(Laravel) side. Any advise or guidance would be greatly appreciated, Thanks.</p>