Skip to content

Commit ad468e6

Browse files
authored
Merge pull request #3243 from Seb33300/array-notation
fix: support for array notation
2 parents 14779dd + 1de6327 commit ad468e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EloquentDataTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ protected function resolveRelationColumn(string $column): string
169169
{
170170
$parts = explode('.', $column);
171171
$columnName = array_pop($parts);
172-
$relation = str_replace('[]', '', implode('.', $parts));
172+
$relation = preg_replace('/\[.*?\]/', '', implode('.', $parts));
173173

174174
if ($this->isNotEagerLoaded($relation)) {
175175
return parent::resolveRelationColumn($column);

0 commit comments

Comments
 (0)