在没有 bake 命令的情况下在 CakePHP 中搭建脚手架

scaffolding in CakePHP without the bake command

我在制作 CakePHP 脚手架控制器时遇到问题。我不断收到此错误:

The action index is not defined in BookmarksController

我有基本的tableclass.

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

这就是实体 class

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

最后这是控制器

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

class BookmarksController extends AppController{
    var $scaffold;
}

脚手架不存在

来自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