Skip to content

Commit a4edf47

Browse files
committed
update
1 parent 44d70c5 commit a4edf47

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `Filament-Generate-Helpers` will be documented in this file.
44

5+
## 1.0.3 - 2025-01-07
6+
7+
- fix culomn function name
8+
59
## 1.0.2 - 2025-01-07
610

711
### What's Changed

src/Commands/Concerns/CanGenerateTablesHelper.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ protected function getResourceTableColumns(string $model, bool $isFunCall = fals
129129
if ($isFunCall) {
130130
// code...
131131
foreach ($columns as $columnName => $columnData) {
132-
$functionName = Str::camel("{$columnName}Column");
132+
$baseColumnName = Str::before($columnName, '.');
133+
$functionName = Str::camel("{$baseColumnName}Column");
133134
$output .= "static::{$functionName}(),";
134135
$output .= PHP_EOL;
135136
}
@@ -141,7 +142,8 @@ protected function getResourceTableColumns(string $model, bool $isFunCall = fals
141142
foreach ($columns as $columnName => $columnData) {
142143
// Constructor
143144
$Prototype = '\\'.(string) str($columnData['type']);
144-
$functionName = Str::camel("{$columnName}Column");
145+
$baseColumnName = Str::before($columnName, '.');
146+
$functionName = Str::camel("{$baseColumnName}Column");
145147
$output .= PHP_EOL;
146148
$output .= '/**'.PHP_EOL;
147149
$output .= " * {$functionName}".PHP_EOL;

0 commit comments

Comments
 (0)