Created
May 22, 2015 07:18
-
-
Save cholnhial/f8f05c05eeb0dcb9f27c 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
$client = $this->Clients->get($id, ['contain' => ['Contacts', 'Contacts.ContactTitles', 'Contacts.States' => function($q) { | |
return $q | |
->select(['abbreviation']); | |
}, 'Contacts.Countries' => function($q) | |
{ | |
return $q | |
->select(['name']); | |
}], 'joinType' => 'LEFT']); | |
echo count($client->contacts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment