質問編集履歴
6
画像追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -74,4 +74,5 @@
|
|
74
74
|
```
|
75
75
|
### 補足情報(FW/ツールのバージョンなど)
|
76
76
|
|
77
|
-

|
77
|
+

|
78
|
+
](ef47369befc24e1fb14d377932aef64b.png)
|
5
ファイル名の誤りの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,7 +37,7 @@
|
|
37
37
|
</div>
|
38
38
|
@endforeach
|
39
39
|
```
|
40
|
-
|
40
|
+
Post.php
|
41
41
|
```php
|
42
42
|
<?php
|
43
43
|
|
4
PostsController 追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,7 +37,34 @@
|
|
37
37
|
</div>
|
38
38
|
@endforeach
|
39
39
|
```
|
40
|
+
PostsController
|
41
|
+
```php
|
42
|
+
<?php
|
40
43
|
|
44
|
+
namespace App;
|
45
|
+
|
46
|
+
use Illuminate\Database\Eloquent\Model;
|
47
|
+
|
48
|
+
class Post extends Model
|
49
|
+
{
|
50
|
+
|
51
|
+
protected $fillable = [
|
52
|
+
'u_id', 'comment',
|
53
|
+
];
|
54
|
+
|
55
|
+
public function user()
|
56
|
+
{
|
57
|
+
return $this->belongsTo('App\User');
|
58
|
+
}
|
59
|
+
|
60
|
+
public function photos()
|
61
|
+
{
|
62
|
+
return $this->hasMany('App\Photo');
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
```
|
67
|
+
|
41
68
|
### 試したこと
|
42
69
|
様々な書き方を試してみましたが、表示できませんでした
|
43
70
|
|
3
タグ整理
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
2
タグ追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
タグ追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|