CakePhp 4 изменить мнение с помощью метода

//chnage the layout in Cakephp 4 with the layout file called ajax.php
$this->viewBuilder()->setLayout('ajax');
Fierce Falcon