use s3 storage laravel 1

use s3 storage laravel

return Storage::disk('s3')->response('images/' . $image->filename);

Here is what the above code is Doing:
1. We’re using the Storage facade to access the s3 disk.
2. We’re using the response method to generate a response that will be sent back to the browser.
3. We’re passing the path to the image as the first argument to the response method.
4. We’re passing an array of headers as the second argument to the response method.
5. We’re using the getMimeType method to get the mime type of the image.
6. We’re using the getSize method to get the size of the image.
7. We’re using the getLastModified method to get the last modified date of the image.

Similar Posts