• CakePHP 3.2+
  • PHP 5.5.9+

Using composer

The recommended installation method for this plugin is by using composer.

composer require friendsofcake/crud:^4.3

You can also check Packagist.

Loading the plugin

Add the following to your /config/bootstrap.php


Configuring the controller

The Crud plugin provides a trait which will catch a MissingActionException and then step in to provide scaffold actions to the controllers.

To enable Crud across your whole application add the trait to your src/Controller/AppController.php

namespace App\Controller;

class AppController extends \Cake\Controller\Controller
    use \Crud\Controller\ControllerTrait;



To have Crud just scaffold a single controller you can just add the ControllerTrait to that specific controller.

Adding the ControllerTrait itself do not enable anything Crud, but simply installs the code to handle the \Cake\Error\MissingActionException exception so you don’t have to implement an action in your controller for Crud to work.

The next step is to load the Crud component in your controller. A basic example is as follows, and will enable the Crud plugin to scaffold all your controllers index actions.

class AppController extends \Cake\Controller\Controller
    use \Crud\Controller\ControllerTrait;

    public function initialize()

        $this->loadComponent('Crud.Crud', [
            'actions' => [

        // Other application wide controller setup

Further configuration options are detailed on the configuration page.