質問編集履歴
2
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,19 +108,9 @@
|
|
108
108
|
|
109
109
|
}
|
110
110
|
|
111
|
-
//相互フォローを取得
|
112
|
-
|
113
|
-
public function mutual_users()
|
114
|
-
|
115
|
-
{
|
116
|
-
|
117
|
-
return $this->belongsToMany('App\User', 'follows', 'follow_user_id', 'user_id')->wherePivot('user_id', $this->id);
|
118
|
-
|
119
|
-
}
|
120
|
-
|
121
111
|
```
|
122
112
|
|
123
|
-
|
113
|
+
相互フォローの取得は複雑になりそうです。
|
124
114
|
|
125
115
|
|
126
116
|
|
1
追記事項
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,9 +108,19 @@
|
|
108
108
|
|
109
109
|
}
|
110
110
|
|
111
|
+
//相互フォローを取得
|
112
|
+
|
113
|
+
public function mutual_users()
|
114
|
+
|
115
|
+
{
|
116
|
+
|
117
|
+
return $this->belongsToMany('App\User', 'follows', 'follow_user_id', 'user_id')->wherePivot('user_id', $this->id);
|
118
|
+
|
119
|
+
}
|
120
|
+
|
111
121
|
```
|
112
122
|
|
113
|
-
|
123
|
+
|
114
124
|
|
115
125
|
|
116
126
|
|