Skip to content

Instantly share code, notes, and snippets.

@innovaweb-dev
Last active September 19, 2017 15:08
Show Gist options
  • Save innovaweb-dev/01a9f79965c3c8179577b26deb31a6c3 to your computer and use it in GitHub Desktop.
Save innovaweb-dev/01a9f79965c3c8179577b26deb31a6c3 to your computer and use it in GitHub Desktop.
It's possible of use a setter with a find. I will like replace content of field 'aboutMe' if it's empty.
object(Cake\ORM\Entity) {
'user_id' => (int) 1,
'username' => 'demo100',
'avatar' => false,
'password' => '1',
'email' => '1',
'token' => null,
'created' => null,
'modified' => null,
'about_me' => '',
'[new]' => false,
'[accessible]' => [
'*' => true
],
'[dirty]' => [],
'[original]' => [],
'[virtual]' => [],
'[errors]' => [],
'[invalid]' => [],
'[repository]' => 'users'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment