Last active
June 22, 2018 12:36
-
-
Save LubosRemplik/f85cf696512f69fdcc8d5b0255c09aee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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