Skip to content

Commit a3678c6

Browse files
committed
Fixed getting node primary key value in JSON
1 parent f137a2b commit a3678c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/NestedSetsHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static function getHierarchicalArray($modelClass)
3838
$path[$depthValue] = $c;
3939

4040
$value = [
41-
'id' => $model->primaryKey()[0],
41+
'id' => $model->primaryKey,
4242
'text' => $model->name,
4343
];
4444

0 commit comments

Comments
 (0)