Created
January 28, 2016 22:04
-
-
Save styks1987/387f5c2a7829a8fc906e 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
<?php | |
$users = $this->Strategies->Users->find()->contain([ | |
'UserSettings' => function ($q) { | |
return $q->map(function ($setting) { | |
return [$setting->id => $setting->users_user_settings->configuration]; | |
}); | |
} | |
])->toArray(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment