質問編集履歴
1
Userのモデルも追加しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,6 +28,19 @@
|
|
28
28
|
return $this->belongsTo('App\Office');
|
29
29
|
}
|
30
30
|
}
|
31
|
+
|
32
|
+
class User extends Model
|
33
|
+
{
|
34
|
+
//
|
35
|
+
protected $table = 'users';
|
36
|
+
|
37
|
+
public function office()
|
38
|
+
{
|
39
|
+
return $this->hasOne('App\Office');
|
40
|
+
}
|
41
|
+
|
42
|
+
}
|
43
|
+
|
31
44
|
```
|
32
45
|
|
33
46
|
1.userテーブル
|