回答編集履歴
2
参考リンクを追記しました。
answer
CHANGED
@@ -5,4 +5,8 @@
|
|
5
5
|
if (! $request->file->isValid()) {
|
6
6
|
dump($request->file->getErrorMessage()); // for debug
|
7
7
|
}
|
8
|
-
```
|
8
|
+
```
|
9
|
+
|
10
|
+
参考:
|
11
|
+
- [アップロードファイルの取得](https://readouble.com/laravel/6.x/ja/requests.html#retrieving-uploaded-files)
|
12
|
+
- [UploadedFile::getErrorMessage()](https://github.com/symfony/symfony/blob/43688482bc01c40ec421ff9552e1455df460d3f3/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L292)
|
1
コードに「デバッグ用コード」を示すうコメントを追記しました。
answer
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
|
4
4
|
```php
|
5
5
|
if (! $request->file->isValid()) {
|
6
|
-
dump($request->file->getErrorMessage());
|
6
|
+
dump($request->file->getErrorMessage()); // for debug
|
7
7
|
}
|
8
8
|
```
|