add support for re-use of same controller in CRUD

This commit is contained in:
2020-01-14 22:45:30 +01:00
parent 6109520c95
commit ce365b2c41
3 changed files with 8 additions and 7 deletions

View File

@@ -62,10 +62,9 @@ class CRUDRoutesLoader
protected function loadConfig($config): RouteCollection
{
$collection = new RouteCollection();
foreach ($config['actions'] as $name => $action) {
$defaults = [
'_controller' => $action['controller'] ?? $config['controller'].'::'.$name
'_controller' => 'cscrud_'.$config['name'].'_controller'.':'.($action['controller_action'] ?? $name)
];
if ($name === 'index') {