Skip to content

Instantly share code, notes, and snippets.

@LubosRemplik

LubosRemplik/matching.php

Last active Jun 22, 2018
Embed
What would you like to do?
public function findClient(Query $query, array $options)
{
$query->matching(
'OfferTypes', function ($q) use ($options) {
return $q->where(['OfferTypes.id' => $options['client']['offer_type_id']]);
}
);
$query->matching('Clients', function ($q) use ($options) {
return $q->where(['Clients.name' => $options['client']['name']]);
});
return $query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.