質問編集履歴
1
自己解決
test
CHANGED
File without changes
|
test
CHANGED
@@ -65,3 +65,23 @@
|
|
65
65
|
->groupBy('comments.user_id')
|
66
66
|
|
67
67
|
```
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
自己解決
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
DB::table('comments')
|
76
|
+
|
77
|
+
->join('users', function($join) {
|
78
|
+
|
79
|
+
->$join->on('comments.user_id', 'users.user_id')
|
80
|
+
|
81
|
+
})
|
82
|
+
|
83
|
+
->select('users.user_id','users.user_name')
|
84
|
+
|
85
|
+
->groupBy('comments.user_id', 'users.user_name')
|
86
|
+
|
87
|
+
```
|