how to store an image in laravel directly from url
use Storage;
$url = "http://www.google.co.in/intl/en_com/images/srpr/logo1w.png";
$contents = file_get_contents($url);
$name = substr($url, strrpos($url, '/') + 1);
Storage::put($name, $contents);
how to store an image in laravel directly from url
use Storage;
$url = "http://www.google.co.in/intl/en_com/images/srpr/logo1w.png";
$contents = file_get_contents($url);
$name = substr($url, strrpos($url, '/') + 1);
Storage::put($name, $contents);
laravel Can't write image data to path Image::make($image)->resize
// instead of direct address to folder using storage:
Image::make($img)->resize(917, 1000)->save('storage/upload/products/multi-image/' . $make_name);
or
Image::make($img)->resize(917, 1000)->save('/upload/products/multi-image/' . $make_name);
// should use public_path('
Image::make($image)->resize(468, 249)->save(public_path('img/products'.$filename)); //save you image
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us