mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 12:34:03 +00:00
add docblock
This commit is contained in:
parent
73d7918170
commit
ac0dccc6e7
1 changed files with 6 additions and 1 deletions
|
|
@ -140,9 +140,14 @@ trait VirtualColumn
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a column name for an attribute that can be used in SQL queries.
|
||||
*
|
||||
* (`foo` or `data->foo` depending on whether `foo` is in custom columns)
|
||||
*/
|
||||
public function getColumnForQuery(string $column): string
|
||||
{
|
||||
if (in_array($column, static::getCustomColumns())) {
|
||||
if (in_array($column, static::getCustomColumns(), true)) {
|
||||
return $column;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue