requestAction Cakephp 3

Asked

Viewed 298 times

0

Good afternoon, I would like a help to make a requestAction on Cakephp 3, before on cake2 I did so:

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


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

  • Relationship: http://www.sanisoft.com/blog/2014/09/15/view-cell-cakephp-3-quick-start/

  • Other related: http://stackoverflow.com/a/30348446/6402423

1 answer

1


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

I hope I’ve helped!

  • Could explain how your answer solves the problem, the more details an your answer better

  • Exactly that, thank you very much

Browser other questions tagged

You are not signed in. Login or sign up in order to post.