質問編集履歴

1

dd($data)の結果を追加

2022/06/22 02:54

投稿

Error
Error

スコア13

test CHANGED
File without changes
test CHANGED
@@ -53,6 +53,7 @@
53
53
  public function updatePost(Array $data)
54
54
  {
55
55
  if (isset($data['image'])) {
56
+ dd($data)
56
57
  $file_name = $data['image']->store('public/');
57
58
 
58
59
  $this::where('id', $this->id)
@@ -77,5 +78,38 @@
77
78
  }
78
79
  ```
79
80
 
81
+ `dd($data)`の中身は以下です。
82
+
83
+ ```
84
+ ^ Illuminate\Http\UploadedFile {#1296 ▼
85
+ -test: false
86
+ -originalName: "bsk.jpeg"
87
+ -mimeType: "image/jpeg"
88
+ -error: 0
89
+ #hashName: null
90
+ path: "/tmp"
91
+ filename: "phpohha5t"
92
+ basename: "phpohha5t"
93
+ pathname: "/tmp/phpohha5t"
94
+ extension: ""
95
+ realPath: "/tmp/phpohha5t"
96
+ aTime: 2022-06-22 11:52:52
97
+ mTime: 2022-06-22 11:52:52
98
+ cTime: 2022-06-22 11:52:52
99
+ inode: 274324
100
+ size: 142267
101
+ perms: 0100600
102
+ owner: 33
103
+ group: 33
104
+ type: "file"
105
+ writable: true
106
+ readable: true
107
+ executable: false
108
+ file: true
109
+ dir: false
110
+ link: false
111
+ }
112
+ ```
113
+
80
114
  よろしくお願いします。
81
115