Answers for "laravel store image"

PHP
1

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);
Posted by: Guest on June-19-2021
0

laravel store file

$path = $request->file('avatar')->store(
    'avatars', 'public'
);
Posted by: Guest on December-05-2020
0

laravel filesystem

$exists = Storage::disk('s3')->exists('file.jpg');
Posted by: Guest on October-06-2020

Browse Popular Code Answers by Language