Hi everyone,
I upgraded to Lumen 5.1 recently and now I'm getting an error when trying to use Amazon S3. I also cannot find any mention of the filesystem in the Lumen docs - was a lot of stuff taken out??
$app->get('image-test', function() {
$disk = \Storage::disk('s3');
$image = Image::make("https://demo.com/image.jpg");
$image->orientate();
$image->resize(1024, 748, function ($constraint) {
$constraint->aspectRatio();
});
$image->encode('jpg');
$filename = str_random() . '.jpg';
$url = "incident-images/kANSmjocyToM8QpGQiIX/mms/$filename";
$disk->put($url, $image);
});
Error message is:
Fatal error: Class 'League\Flysystem\AwsS3v3\AwsS3Adapter' not found in /home/vagrant/cvahimt-api/vendor/illuminate/filesystem/FilesystemManager.php on line 159
I know for a fact that this used to work, I have the following in composer.json:
"league/flysystem-aws-s3-v2": "~1.0",
"league/flysystem-rackspace": "~1.0",
I also have FILESYSTEM_CLOUD=s3 in my .env, along with my S3 credentials.