mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
default crud new function
This commit is contained in:
@@ -67,10 +67,13 @@ class CRUDRoutesLoader
|
||||
$defaults = [
|
||||
'_controller' => $action['controller'] ?? $config['controller'].'::'.$name
|
||||
];
|
||||
|
||||
if ($action === 'index') {
|
||||
|
||||
if ($name === 'index') {
|
||||
$path = "{_locale}".$config['base_path'];
|
||||
$route = new Route($path, $defaults);
|
||||
} elseif ($name === 'new') {
|
||||
$path = "{_locale}".$config['base_path'].'/'.$name;
|
||||
$route = new Route($path, $defaults);
|
||||
} else {
|
||||
$path = "{_locale}".$config['base_path'].($action['path'] ?? '/{id}/'.$name);
|
||||
$requirements = $action['requirements'] ?? [
|
||||
|
Reference in New Issue
Block a user