Skip to content

Instantly share code, notes, and snippets.

View LubosRemplik's full-sized avatar

Luboš Remplík LubosRemplik

View GitHub Profile
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']]);
});