Try to access 'storage/app/folder1/a.png' from my view
public function viewStorageFiles()
{
$fileFullPath = Storage::disk('local')->path('folder1/a.png');
$fileUrl = Storage::disk('local')->url('app/folder1/a.png');
$storage_path = storage_path('app/folder1/a.png');
return view('email.fileDownload')->with([
'fileFullPath' => $fileFullPath,
'fileUrl' => $fileUrl,
'storage_path' => $storage_path,
]);
}
In view : email.fileDownload
<div>
<p> asset($fileUrl) ==> </p>
<img src=""/>
</div>
<div>
<p> url($fileUrl) ==> </p>
<img src=""/>
</div>
<div>
<p> storage_path($fileUrl) ==> </p>
<img src=""/>
</div>
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2TVZBig
via IFTTT
Aucun commentaire:
Enregistrer un commentaire