title: How to pass data to json from Database in Laravel
body: <p>Here is my Row Query to get the data from database.</p>
  
  <pre><code>$users = DB::table('users')-&gt;get();
  </code></pre>
  
  <p>I want to pass my $users array data to json format. How can I do so?</p>
  
  <p>I have tried using Eloquent Model. but didn't work.</p>
  
  <p>Thank You in Advance.</p>