質問編集履歴
6
画像追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -151,3 +151,5 @@
|
|
151
151
|
|
152
152
|
|
153
153
|
![イメージ説明](b72e92fa63ad8f4023df6aaf222106e6.png)
|
154
|
+
|
155
|
+
![![イメージ説明](6ee1ef0de6daf65da4765fba7c783f3c.png)](ef47369befc24e1fb14d377932aef64b.png)
|
5
ファイル名の誤りの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
```
|
78
78
|
|
79
|
-
Post
|
79
|
+
Post.php
|
80
80
|
|
81
81
|
```php
|
82
82
|
|
4
PostsController 追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,6 +76,60 @@
|
|
76
76
|
|
77
77
|
```
|
78
78
|
|
79
|
+
PostsController
|
80
|
+
|
81
|
+
```php
|
82
|
+
|
83
|
+
<?php
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
namespace App;
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
use Illuminate\Database\Eloquent\Model;
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
class Post extends Model
|
96
|
+
|
97
|
+
{
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
protected $fillable = [
|
102
|
+
|
103
|
+
'u_id', 'comment',
|
104
|
+
|
105
|
+
];
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
public function user()
|
110
|
+
|
111
|
+
{
|
112
|
+
|
113
|
+
return $this->belongsTo('App\User');
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
public function photos()
|
120
|
+
|
121
|
+
{
|
122
|
+
|
123
|
+
return $this->hasMany('App\Photo');
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
```
|
132
|
+
|
79
133
|
|
80
134
|
|
81
135
|
### 試したこと
|
3
タグ整理
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
2
タグ追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
タグ追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|