From 0aedac22a7dbd4d7371fa54f7001303d39dbaccf Mon Sep 17 00:00:00 2001 From: ADmad Date: Thu, 2 Oct 2025 22:30:16 +0530 Subject: [PATCH] Change render method to return in PostsController --- en/controllers.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/controllers.rst b/en/controllers.rst index 8b448241d5..8d2b6a28ea 100644 --- a/en/controllers.rst +++ b/en/controllers.rst @@ -254,7 +254,7 @@ have called ``Controller::render()``, CakePHP will not try to re-render the view { public function my_action() { - $this->render('custom_file'); + return $this->render('custom_file'); } } @@ -271,7 +271,7 @@ For example:: { public function myAction() { - $this->render('Users.UserDetails/custom_file'); + return $this->render('Users.UserDetails/custom_file'); } }