Skip to content

Commit a803bfd

Browse files
authored
Eloquent: firstWhere returns Object instead of NULL (#41099)
1 parent 5042db0 commit a803bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
296296
*/
297297
public function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
298298
{
299-
return $this->where($column, $operator, $value, $boolean)->first();
299+
return $this->where(...func_get_args())->first();
300300
}
301301

302302
/**

0 commit comments

Comments
 (0)