Created
February 14, 2018 12:20
-
-
Save LubosRemplik/0d82f7cfbb0eabd4751f22ac2a6648c9 to your computer and use it in GitHub Desktop.
Crud associated data
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 edit($id) | |
{ | |
$this->Crud->on('beforeFind', function(\Cake\Event\Event $event) { | |
$event->getSubject()->query->contain(['Roles']); | |
}); | |
$this->Crud->execute(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment