public function testFacadeCanBeResolvedToServiceInstance() { $app = $this->setupApplication(); $this->setupServiceProvider($app); // Mount facades AWS::setFacadeApplication($app); // Get an instance of a client (S3) via its facade $s3 = AWS::get('s3'); $this->assertInstanceOf('Aws\\S3\\S3Client', $s3); }
/** * @return void */ protected function uploadS3() { $bucket = $this->option('upload-s3'); $s3 = AWS::get('s3'); $s3->putObject(['Bucket' => $bucket, 'Key' => $this->getS3DumpsPath() . '/' . $this->fileName, 'SourceFile' => $this->filePath]); }