mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 21:14:03 +00:00
Add method for generating column names
This commit is contained in:
parent
66458d046b
commit
43f0b2c30f
1 changed files with 9 additions and 0 deletions
|
|
@ -139,4 +139,13 @@ trait VirtualColumn
|
|||
'id',
|
||||
];
|
||||
}
|
||||
|
||||
public function generateColumnName(string $column): string
|
||||
{
|
||||
if (in_array($column, static::getCustomColumns())) {
|
||||
return $column;
|
||||
}
|
||||
|
||||
return static::getDataColumn() . '->' . $column;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue