Interview Questions

How to add Scaffolding in your application?

CakePHP Interview Questions and Answers


(Continued from previous question...)

How to add Scaffolding in your application?

To add scaffolding to your application,just add the $scaffold variable in the controller,
<?php
class PostsController extends AppController {
var $scaffold;
}
?>
Assuming you’ve created Post model class file (in /app/Model/post.php), you’re ready to go. Visit http://example.com/posts to see your new scaffold.

(Continued on next question...)

Other Interview Questions