Level 27
@ifrit Your code looks correct, the only bone I will pick is why >, you want the future's as well?
- Are the time zones the same for your MySQL and PHP?
- What are you getting for
dd(Carbon::today())?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to grab all my items that was created today, the issue I'm having is that I'm still getting yesterday's items. Here is my code
$items = Item::where('created_at', '>=', Carbon::today())->paginate(10);
Please or to participate in this conversation.