Use FQCN::method to build CRUD routes

This commit is contained in:
Julie Lenaerts 2025-05-28 14:32:59 +02:00
parent 2f3caafd10
commit 8b9b427a1e

View File

@ -150,12 +150,12 @@ class CRUDRoutesLoader extends Loader
protected function loadCrudConfig($crudConfig): RouteCollection
{
$collection = new RouteCollection();
$controller = 'cscrud_'.$crudConfig['name'].'_controller';
$controllerClass = $crudConfig['controller'];
foreach ($crudConfig['actions'] as $name => $action) {
// defaults (controller name)
$defaults = [
'_controller' => $controller.':'.($action['controller_action'] ?? $name),
'_controller' => $controllerClass.'::'.($action['controller_action'] ?? $name),
];
if ('index' === $name) {