Skip to content

Commit 1de6327

Browse files
committed
fix: support for array notation
1 parent 14779dd commit 1de6327

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)