cakePHP Archives - Ian Carnaghan

Disabling the Layout and the View in cakePHP

To disable the view and the layout in cakePHP set autoRender to false within the appropriate action in your controller $this->autoRender = false; To only disable the layout in cakePHP set the layout to false $this->layout = false; And to only disable the view for an action call the render method and...

Mar 22 · 13 sec read >

How to check in Controller which validation rule failed in cakePHP

Put the code below in your controller and replace the model name with the appropriate model name against which...

Mar 22 · 10 sec read >

How to find the value of a single field in cakePHP

Use the model method field if no matching data is found it returns false. Example   $this->Model->id = 10;   $this->Model->field('name');...

Mar 22 · 10 sec read >