When I initialize S3 bucket in laravel, I am getting the following error
Call to undefined method Aws\Common\Aws::createClient()
I use
{
"require": {
"aws/aws-sdk-php-laravel": "~3.0"
}
}
Here is the function
public function uploadProductImgAPI(Request $request)
{
$file = $request->file('file');
$extension = $file->getClientOriginalExtension();
$s3 = AWS::createClient('s3');
dd($s3);
return response()->json('upload ok!!');
}
Thanks!!
Aucun commentaire:
Enregistrer un commentaire