Disable layout in Zend Framework 3?

1.9k Views Asked by At

How to disable layout in Zend Framework 3?

Trying to get response from an Ajax call, it needs layout to be disabled.

1

There are 1 best solutions below

0
On

Here it is

public function indexAction(){
    $view = new \Zend\View\Model\ViewModel();
    $view->setTerminal(true);

    return $view;
}