Hey!
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.