requestAction Cakephp 3

0

Good afternoon, I would like a help to make a requestAction in Cakephp 3, before in cake2 I would do it this way:

<?php $post = $this->requestAction('/Posts/latest'); foreach ($post as $value) : ?>


function latest() 
{
    return $this->Post->find('all', array('order' => 'Post.id DESC','limit' => 1));
}

    
asked by anonymous 13.06.2016 / 22:08

1 answer

1
$this->requestAction(['controller' => '', 'action' => ''], ['pass'] => ['algum parametro se houver']);

I hope I have helped!

    
23.02.2017 / 19:03