CakePHP: Utilizar modelos en un componente

Para poder utilizar modelos en un componente utilizando cakephp deben realizar los siguiente:

public function __construct() {
    $this->Modelo1 = ClassRegistry::init('Modelo1');
    $this->Modelo2 = ClassRegistry::init('Modelo2');
}

Fuente

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.