title: Laravel - Show users from the last 30 days
body: <p>I have a Laravel query that looks like this</p>
  
  <pre><code>$users = DB::table("users")
                     -&gt;select('id')
                     -&gt;where('accounttype', 'standard')
                     -&gt;get()-&gt;all();
  </code></pre>
  
  <p>It is working and returning the id for all standard accounts, I am trying to limit it to only return results from the last 30 days, the date the user was created is stored as a timestamp in 'created_at'</p>
  
  <p>Is it best to do this in the query or should I process the results afterwards?</p>