Closed joaopmmartins closed 5 years ago
When I try the following query using parameter grouping :
` $type1 = 'cultivator'; $type2 = 'fork';
$products = Product::whereAttribute('garden_tool_material', '=', 'wooden') ->whereAttribute(function ( $query) use ($type1, $type2) { $query->whereAttribute('garden_tool_type', '=', $type1); $query->orWhereAttribute('garden_tool_type', '=', $type2); })->get() ->select(['attr.*']); `
I get the error:
Illegal offset type
@joaopmmartins
Can you check now i have made a fix for the issue
Sunel, many thanks for that.
When I try the following query using parameter grouping :
` $type1 = 'cultivator'; $type2 = 'fork';
$products = Product::whereAttribute('garden_tool_material', '=', 'wooden') ->whereAttribute(function ( $query) use ($type1, $type2) { $query->whereAttribute('garden_tool_type', '=', $type1); $query->orWhereAttribute('garden_tool_type', '=', $type2); })->get() ->select(['attr.*']); `
I get the error:
Illegal offset type