Level 51
Try
$record = Product::where('id', 0)->get('id');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
When i make query at this type:
$record = Product::selectRaw('id < ?', [552])
->where('id', 0)
->select('id');
query builder make this query:
select `id` from `products` where `id` = '552'
not:
select `id` from `products` where `id` = '0'
Used laravel 5.7
Please or to participate in this conversation.