Last active
November 7, 2022 13:50
-
-
Save DemianKost/45b0cd0f9ecdda5fa5ef74fc0b858cce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Storage; | |
class DiskController extends Controller | |
{ | |
public function index() | |
{ | |
Storage::put('test1.txt', 'test again'); | |
// If you didn't setup S3 as default disk in .env file | |
$contents = Storage::disk('s3')->get('test1.txt'); | |
var_dump( $contents ); // This will show "test again text" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment