hi,
I am trying to pass variables to afterSaveCommit
. My code below doesn’t pass the variable/options. Can someone please point me to the right docs ?
Here is what I tried :
// in controller
$this->Articles->save( $entity, ['variable' => 'my variable'] );
// in ArticlesTable.php
public function afterSaveCommit(Event $event, EntityInterface $entity, ArrayObject $options)
{
//debug( $event );
//debug( $entity );
debug( $options );
}
Output :
APP/Model/Table/ArticlesTable.php (line 54)
object(ArrayObject) id:0 {
}
Thanks