Category: Models & ORM

Q: Cakephp use query builder in component

How to use Cakephp query builder in component? (PostutilsComponent.php)

//controller

public function blogPost($post_id = null)
{

    $this->set('recent_posts', $this->Postutils->getRecentPosts());
}

0 Answers

Version: 3

No answers yet!

The community needs your help!

Post your Answer

Created: 6 Oct '16

Last Reply: None

Replies: 0

Views: 267

Votes: 0

Welcome to Aero Coding!

Aero Coding is a CakePHP-focused Q&A community for professional and enthusiast cake bakers. It's built and run by you as part of the community.


Join Now Tour

Download Cakephp

Start baking your own CakePHP application!


Cakephp All Versions