Skip to content

Commit 743fe25

Browse files
committed
Bug Fixed for Determining Function Name in Resources Generation
1 parent 1b2199e commit 743fe25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Commands/MakeResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function writeGetter(string $getterStub, string $columnName, string $attr
3737
public function writeForeignGetter(string $foreignGetterStub, string $columnName, string $attributeName)
3838
{
3939
return str_replace(['{{ AttributeName }}', '{{ GetterName }}', '{{ AttributeType }}'],
40-
[$columnName, ucfirst($attributeName), ucfirst($attributeName)],
40+
[snake_case($columnName), ucfirst($columnName), ucfirst($attributeName)],
4141
$foreignGetterStub);
4242
}
4343

@@ -100,7 +100,7 @@ public function handle(): int
100100
foreach ($foreignKeys as $_foreignKey) {
101101
$baseContent = substr_replace($baseContent,
102102
$this->writeForeignGetter($foreignGetterStub, $_foreignKey->VARIABLE_NAME, $_foreignKey->ENTITY_DATA_TYPE),
103-
-19, 0);
103+
-20, 0);
104104
}
105105
}
106106

0 commit comments

Comments
 (0)