Support the ongoing development of →
Database Laravel
Last updated 2 years ago.


The easiest way to do this would be somethink like this:

// Download image - this does not handle 404 or other webserver errors
$imageContent = file_get_contents($url);

\Illuminate\Support\Facades\Storage::disk('public')->put($image, $imageContent);

You can put that code right below $image = $id.'.jpg'; in your code.

huypham55, marcelzutphen liked this reply

Solution selected by @renaldyks

Sign in to participate in this thread!


Your banner here too?

Kev renaldyks Joined 19 Oct 2021


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.

© 2024 - All rights reserved.