回答編集履歴
3
既存ファイルのパーミッション変更について追記
answer
CHANGED
@@ -4,4 +4,7 @@
|
|
4
4
|
<img src="{{ Storage::url('noimage.png') }}" ... >
|
5
5
|
```
|
6
6
|
|
7
|
-
[ファイルURL](https://readouble.com/laravel/5.8/ja/filesystem.html#file-urls)
|
7
|
+
[ファイルURL](https://readouble.com/laravel/5.8/ja/filesystem.html#file-urls)
|
8
|
+
|
9
|
+
(追記)
|
10
|
+
`noimage.png`のパーミッションを変更するとどうでしょうか。 `chmod 664 public/storage/noimage.png` とかです。
|
2
回答を変更しました(asset() -> Strage::url())
answer
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
画像表示部分で`
|
1
|
+
画像表示部分で`Storage::url()`を使うとどうでしょうか。
|
2
2
|
|
3
3
|
```php
|
4
|
-
<img src="{{
|
4
|
+
<img src="{{ Storage::url('noimage.png') }}" ... >
|
5
5
|
```
|
6
6
|
|
7
|
-
[
|
7
|
+
[ファイルURL](https://readouble.com/laravel/5.8/ja/filesystem.html#file-urls)
|
1
コードを追記
answer
CHANGED
@@ -1,3 +1,7 @@
|
|
1
1
|
画像表示部分で`asset`ヘルパを使うとどうでしょうか。
|
2
2
|
|
3
|
+
```php
|
4
|
+
<img src="{{ asset('storage/noimage.png') }}" ... >
|
5
|
+
```
|
6
|
+
|
3
7
|
[パブリックディスク](https://readouble.com/laravel/6.x/ja/filesystem.html#the-public-disk)
|