Skip to content

Commit 86319b1

Browse files
authored
Merge pull request #633 from flartet/patch-5
Update crud-columns.md
2 parents 86c0f9d + 37491c8 commit 86319b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

6.x/crud-columns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ $this->crud->addColumn([
15421542
'attribute' => 'name', // foreign key attribute that is shown to user
15431543
'orderable' => true,
15441544
'orderLogic' => function ($query, $column, $columnDirection) {
1545-
return $query->leftJoin('categories', 'categories.id', '=', 'articles.select')
1545+
return $query->leftJoin('categories', 'categories.id', '=', 'articles.category_id')
15461546
->orderBy('categories.name', $columnDirection)->select('articles.*');
15471547
}
15481548
]);

0 commit comments

Comments
 (0)