Answers for "get file in laravel s3"

PHP
3

laravel get file contents from storage

$contents = Storage::disk('local')->get('file.txt');
Posted by: Guest on January-07-2021
0

store image to s3 laravel

// Products controller
use Illuminate\Support\Facades\Storage;

$image = $request->file('image');
$filePath = 'images/' . $image->getClientOriginalName();
Storage::disk('s3')->put($filePath, file_get_contents($image), 'public');
Posted by: Guest on May-11-2021

Browse Popular Code Answers by Language