Obtenez des records de 30 derniers jours à Laravel

use Carbon\Carbon;

$users = DB::table("users")
    ->select('id')
    ->where('accounttype', 'standard')
    ->where('created_at', '>', now()->subDays(30)->endOfDay())
    ->all();
Sharifur Robin