Support the ongoing development of Laravel.io →
Requests Database Views
Last updated 2 years 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

Thank you! :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Verluro verluro Joined 23 Apr 2018

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.