質問編集履歴
1
toArray()を使用して、配列を返すようにしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,6 +38,18 @@
|
|
38
38
|
|
39
39
|
}
|
40
40
|
|
41
|
+
|
42
|
+
|
43
|
+
変更後
|
44
|
+
|
45
|
+
public function getData($uid)
|
46
|
+
|
47
|
+
{
|
48
|
+
|
49
|
+
return $this->where('id', $uid)->get(['nickname'])->toArray();
|
50
|
+
|
51
|
+
}
|
52
|
+
|
41
53
|
```
|
42
54
|
|
43
55
|
review.blade.php
|
@@ -49,6 +61,20 @@
|
|
49
61
|
<span id="nickname">
|
50
62
|
|
51
63
|
{{$user_datum->nickname}}
|
64
|
+
|
65
|
+
</span>
|
66
|
+
|
67
|
+
@endforeach
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
変更後
|
72
|
+
|
73
|
+
@foreach ($user_data as $dictionary)
|
74
|
+
|
75
|
+
<span id="nickname">
|
76
|
+
|
77
|
+
{{$dictionary['nickname']}}
|
52
78
|
|
53
79
|
</span>
|
54
80
|
|