Skip to content

Commit

Permalink
fixed mixed up model label in relations detail view tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
eluhr committed Dec 16, 2024
1 parent 339cb7f commit 5487c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generators/crud/default/views/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}();
Expand Down Expand Up @@ -264,7 +264,7 @@

echo "<?php \$this->endBlock() ?>\n\n";
// build tab items
$itemLabel = $generator->generateString($label);
$itemLabel = $generator->generateString($name);
$items .= <<<EOS
[
'content' => \$this->blocks['$name'],
Expand Down

0 comments on commit 5487c23

Please sign in to comment.