teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

テーブル修正、HasManyThroughについて追記

2017/05/10 10:04

投稿

masaya_ohashi
masaya_ohashi

スコア9210

title CHANGED
File without changes
body CHANGED
@@ -12,7 +12,7 @@
12
12
  |id|user_id|owned_user_id|
13
13
  |--:|--:|--:|
14
14
  |1|1|2|
15
- |1|1|3|
15
+ |2|1|3|
16
16
 
17
17
  このテーブルはaaaというユーザの下にbbb、cccというユーザが子として紐付いていることを表現しようとしています。
18
18
 
@@ -69,5 +69,8 @@
69
69
  - [Laravel 5.3 Eloquent:リレーション](https://readouble.com/laravel/5.3/ja/eloquent-relationships.html)を一通り調べた
70
70
 
71
71
  (追記) 読み直していたら[Has Many Through](https://readouble.com/laravel/5.3/ja/eloquent-relationships.html#has-many-through)という項目があることに気付きました…検証します。
72
+
73
+ (追記の追記)Has Many Throughではだめでした。
74
+
72
75
  ###補足情報(言語/FW/ツール等のバージョンなど)
73
76
  - Laravel 5.3

1

追記

2017/05/10 10:04

投稿

masaya_ohashi
masaya_ohashi

スコア9210

title CHANGED
File without changes
body CHANGED
@@ -68,6 +68,6 @@
68
68
  ###試したこと
69
69
  - [Laravel 5.3 Eloquent:リレーション](https://readouble.com/laravel/5.3/ja/eloquent-relationships.html)を一通り調べた
70
70
 
71
-
71
+ (追記) 読み直していたら[Has Many Through](https://readouble.com/laravel/5.3/ja/eloquent-relationships.html#has-many-through)という項目があることに気付きました…検証します。
72
72
  ###補足情報(言語/FW/ツール等のバージョンなど)
73
73
  - Laravel 5.3