From 5487c238263b950b7cca1756ffaf0fb3a531edc7 Mon Sep 17 00:00:00 2001 From: Elias Luhr Date: Mon, 16 Dec 2024 09:35:43 +0100 Subject: [PATCH] fixed mixed up model label in relations detail view tabs --- src/generators/crud/default/views/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/crud/default/views/view.php b/src/generators/crud/default/views/view.php index 45737a0..2e419b8 100644 --- a/src/generators/crud/default/views/view.php +++ b/src/generators/crud/default/views/view.php @@ -193,7 +193,7 @@ if ($generator->disablePluralization) { $pivotName = $name; } else { - $pivotName = Inflector::pluralize($modelName); + $pivotName = Inflector::pluralize($name); } $label = Inflector::camel2words($pivotName); $pivotRelation = $model->{'get' . $pivotName}(); @@ -264,7 +264,7 @@ echo "endBlock() ?>\n\n"; // build tab items - $itemLabel = $generator->generateString($label); + $itemLabel = $generator->generateString($name); $items .= << \$this->blocks['$name'],