Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
A909M committed Jan 7, 2025
1 parent 44d70c5 commit a4edf47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## 1.0.3 - 2025-01-07

- fix culomn function name

## 1.0.2 - 2025-01-07

### What's Changed
Expand Down
6 changes: 4 additions & 2 deletions src/Commands/Concerns/CanGenerateTablesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ protected function getResourceTableColumns(string $model, bool $isFunCall = fals
if ($isFunCall) {
// code...
foreach ($columns as $columnName => $columnData) {
$functionName = Str::camel("{$columnName}Column");
$baseColumnName = Str::before($columnName, '.');
$functionName = Str::camel("{$baseColumnName}Column");
$output .= "static::{$functionName}(),";
$output .= PHP_EOL;
}
Expand All @@ -141,7 +142,8 @@ protected function getResourceTableColumns(string $model, bool $isFunCall = fals
foreach ($columns as $columnName => $columnData) {
// Constructor
$Prototype = '\\'.(string) str($columnData['type']);
$functionName = Str::camel("{$columnName}Column");
$baseColumnName = Str::before($columnName, '.');
$functionName = Str::camel("{$baseColumnName}Column");
$output .= PHP_EOL;
$output .= '/**'.PHP_EOL;
$output .= " * {$functionName}".PHP_EOL;
Expand Down

0 comments on commit a4edf47

Please sign in to comment.