I want to use the different queries inside one method and I want to pass a part of query inside that.
My method looks like this:
static function methodName($partOfQuery)
{
ModelName::where('...')->$partOfQuery->...;
}
And I want to do something like:
$partOfQuery = where('columnName', '>=', 5)->whereRaw('Other Condition');
self::methodName($partOfQuery);
But I was faced with this error:
Call to undefined function App\Classes\ClassName\where()
Anyone could help me with this issue? Thanks