Support the ongoing development of Laravel.io →
Requests Database Views
Last updated 3 months ago.
0

You could also do it like this

$path = $request->file("file_input_name")->store("images/product/");
$url = Storage::url($path);
$product["image_url"] = $url;

That's going to save it as: "/storage/images/product/filename.ext"

And then access it from your view direclty:

<img src="{{$product->image_url}}"/>
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

Verluro Verluro verluro Joined 23 Apr 2018

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.