Search code examples
phpcakephpcakephp-3.0scaffolding

scaffolding in CakePHP without the bake command


I am having trouble making a CakePHP scaffold controller. I keep getting this error:

The action index is not defined in BookmarksController

I have a basic table class.

namespace App\Model\Table;
use Cake\ORM\Table;
class BookmarksTable extends Table{
{

And this is the entity class

namespace App\Model\Entity;
use Cake\ORM\Entity;
class Bookmark extends Entity
{
}

finally this is the controller

namespace App\Controller;
use App\Controller\AppController;

class BookmarksController extends AppController{
    var $scaffold;
}

Solution

  • Scaffolding doesn't exist

    From the 3.0 migration guide:

    Scaffold Removed

    The dynamic scaffolding in CakePHP has been removed from CakePHP core. It was infrequently used, and never intended for production use. An improved scaffolding plugin, named CRUD, can be found here: https://github.com/FriendsOfCake/crud