Level 3
$product= Product::query()->orderBy('updated_at', 'asc')
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using orderBy query but not working
You can my code
$product= Product::query()->orderBy('updated_at', 'asc')->get();
$product= Product::query()->orderBy('updated_at', 'asc')
Please or to participate in this conversation.