Level 75
A scope would do this.
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
If I have a function with the base query, and I want to pass extra query as a variable:
function updateQuery($extra_query)
{
$base_query = Model::where(...);
// $base_query->(add $extra_query)->get();
}
For example if I want to add where('col_x', '=', $val) and pass that to the function, how can I do that?
Thanks
Please or to participate in this conversation.