We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3818c2a commit e738a72Copy full SHA for e738a72
src/Illuminate/Database/Query/Builder.php
@@ -29,6 +29,8 @@
29
use RuntimeException;
30
use UnitEnum;
31
32
+use function Illuminate\Support\enum_value;
33
+
34
class Builder implements BuilderContract
35
{
36
/** @use \Illuminate\Database\Concerns\BuildsQueries<object> */
@@ -4208,7 +4210,7 @@ public function addBinding($value, $type = 'where')
4208
4210
public function castBinding($value)
4209
4211
4212
if ($value instanceof UnitEnum) {
- return $value instanceof BackedEnum ? $value->value : $value->name;
4213
+ return enum_value($value);
4214
}
4215
4216
return $value;
0 commit comments