Last updated on November 17, 2022
Downloading images and files from the URL is simple and easy with Laravel’s Illuminate\Support\Facades\Storage;
class.
We gonna use file_get_contents
function to reads the entire file into a string, we have to give its output to Storage’s class put method.
Storage::disk('local')->put('arjunphp_laravel.png', file_get_contents('https://arjunphp.com/wp-content/uploads/2015/06/arjunphp_laravel.png'));