回答編集履歴
1
追記
test
CHANGED
@@ -15,3 +15,41 @@
|
|
15
15
|
|
16
16
|
|
17
17
|
`->first()` をつけて、`Address`を返さなくてはいけません。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```php
|
26
|
+
|
27
|
+
<?php
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
namespace App;
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
use Illuminate\Database\Eloquent\Model;
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
class Address extends Model
|
40
|
+
|
41
|
+
{
|
42
|
+
|
43
|
+
// ここの定義方法も間違っている
|
44
|
+
|
45
|
+
protected $fillable = [
|
46
|
+
|
47
|
+
'name'
|
48
|
+
|
49
|
+
];
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
```
|