(Incubator project) Automated admin backend based on your Crud configuration
This project is in very very early stage of development, do not use it production unless you want to get down and dirty on the code :)
Current Twitter Bootstrap 3 template: sb-admin from startbootstrap.com
-
make sure to follow the normal CRUD install settings
-
change
AppController::$viewClass
toCrudView\View\CrudView
-
load the
CrudView.View
,Crud.RelatedModels
andCrud.Redirect
listeners -
configure the
FormHelper
to look like below -
hopefully going to
/<your controller with crud enabled/
should just work
<?php
namespace App\Controller;
class AppController extends \Cake\Controller\Controller {
use \Crud\Controller\ControllerTrait;
public $viewClass = 'CrudView\View\CrudView';
public $components = [
'Crud.Crud' => [
'actions' => ['Crud.Index', 'Crud.Add', 'Crud.Edit', 'Crud.View', 'Crud.Delete'],
'listeners' => ['CrudView.View', 'Crud.RelatedModels', 'Crud.Redirect']
]
];
public $helpers = [
'Form' => [
'templates' => 'CrudView.forms',
'widgets' => [
'_default' => ['CrudView\View\Widget\Basic'],
'textarea' => ['CrudView\View\Widget\Textarea'],
'select' => ['CrudView\View\Widget\SelectBox'],
'label' => ['CrudView\View\Widget\Label'],
'datetime' => ['CrudView\View\Widget\DateTime', 'select']
]
]
];
}