質問編集履歴
3
書き直しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
```php```
|
40
40
|
|
41
|
-
public function up()
|
41
|
+
```public function up()
|
42
42
|
|
43
43
|
{
|
44
44
|
|
@@ -61,6 +61,10 @@
|
|
61
61
|
});
|
62
62
|
|
63
63
|
}
|
64
|
+
|
65
|
+
コード
|
66
|
+
|
67
|
+
```
|
64
68
|
|
65
69
|
|
66
70
|
|
2
コードをマークダウンで書き直した
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,6 +36,8 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
+
```php```
|
40
|
+
|
39
41
|
public function up()
|
40
42
|
|
41
43
|
{
|
@@ -64,7 +66,7 @@
|
|
64
66
|
|
65
67
|
**addresses table**
|
66
68
|
|
67
|
-
|
69
|
+
```php
|
68
70
|
|
69
71
|
public function up()
|
70
72
|
|
@@ -84,11 +86,17 @@
|
|
84
86
|
|
85
87
|
}
|
86
88
|
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
|
87
93
|
|
88
94
|
|
89
95
|
**app/user.php**
|
90
96
|
|
91
97
|
|
98
|
+
|
99
|
+
```php
|
92
100
|
|
93
101
|
public function address(){
|
94
102
|
|
@@ -96,11 +104,15 @@
|
|
96
104
|
|
97
105
|
}
|
98
106
|
|
107
|
+
```
|
108
|
+
|
99
109
|
|
100
110
|
|
101
111
|
**app/address.php**
|
102
112
|
|
103
113
|
|
114
|
+
|
115
|
+
```php
|
104
116
|
|
105
117
|
protected $fillable = [
|
106
118
|
|
@@ -108,11 +120,15 @@
|
|
108
120
|
|
109
121
|
];
|
110
122
|
|
123
|
+
```
|
124
|
+
|
111
125
|
|
112
126
|
|
113
127
|
**routes/web.php**
|
114
128
|
|
115
129
|
|
130
|
+
|
131
|
+
```php
|
116
132
|
|
117
133
|
use App\User;
|
118
134
|
|
@@ -142,7 +158,11 @@
|
|
142
158
|
|
143
159
|
|
144
160
|
|
161
|
+
```
|
162
|
+
|
145
163
|
**app/user.phpで、**
|
164
|
+
|
165
|
+
```php
|
146
166
|
|
147
167
|
public function address(){
|
148
168
|
|
@@ -158,6 +178,8 @@
|
|
158
178
|
|
159
179
|
}
|
160
180
|
|
181
|
+
```
|
182
|
+
|
161
183
|
|
162
184
|
|
163
185
|
の両方を試しました。
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,6 +13,10 @@
|
|
13
13
|
laravelでデータのinsertやupdate,deleteの処理を行いたいのですが、
|
14
14
|
|
15
15
|
下記のソースを実行してもデータがテーブルに入りません。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
はじめにuser情報は手動で入れたので、id=1のユーザーはテーブル内に存在しています。
|
16
20
|
|
17
21
|
|
18
22
|
|
@@ -74,7 +78,7 @@
|
|
74
78
|
|
75
79
|
$table->string('name');
|
76
80
|
|
77
|
-
|
81
|
+
$table->timestamps();
|
78
82
|
|
79
83
|
});
|
80
84
|
|