Answer the question
In order to leave comments, you need to log in
How to save image file from Facebook API link in Laravel 5+?
I get a link like this: https://graph.facebook.com/v2.10/social_id/picture... How can I save this file in the lara?
I tried all the methods from the documentation and nothing works, it only works through the Tinify::fromUrl() optimization package, but I need to keep it as it is.
Answer the question
In order to leave comments, you need to log in
The problem was solved by including the intervention/image package. Thanks to all!)
In addition to studying the Laravel documentation, I would advise you to study the language itself
$url = " www.google.co.in/intl/en_com/images/srpr/logo1w.png ";
$contents = file_get_contents($url);
$name = basename($url);
Storage::put($name, $contents);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question