TIP 25 / 100

No Need to Convert Carbon.

If you're performing whereDate() and check today's records, you can use Carbon's now() and it will automatically be transformed to date. No need to do ->toDateString().

code
// Previous approach:
$todayUsers = User::whereDate('created_at', now()->toDateString())->get();
// Use now() directly; no conversion is required.
$todayUsers = User::whereDate('created_at', now())->get();