title: Live pull data from database in laravel
body: <p>How can I pull data in real time from a MySQL database via Laravel? </p>
  
  <p>I'd prefer to call the code from a blade view. </p>
  
  <p>How can I implement this, or what's the right approach for this?</p>
  
  <p>The line of code I'm using to get the data is:</p>
  
  <pre><code>Facility::where('aID',$this-&gt;id)-&gt;where('type',$type)-&gt;count();
  </code></pre>