質問編集履歴

1

Postモデルの追記

2020/07/17 09:32

投稿

coffee912
coffee912

スコア12

test CHANGED
File without changes
test CHANGED
@@ -136,6 +136,24 @@
136
136
 
137
137
 
138
138
 
139
+ ```php
140
+
141
+ Postモデル
142
+
143
+ // リレーション
144
+
145
+ public function user()
146
+
147
+ {
148
+
149
+ return $this->belongsTo(User::class);
150
+
151
+ }
152
+
153
+ ```
154
+
155
+
156
+
139
157
  ### 調べたこと
140
158
 
141
159