protected function s3Adapter(): AwsS3Adapter
    {
        if (isset(self::$adapters['s3'])) {
            return self::$adapters['s3'];
        }

        $config       = $this->app->config()['filesystem']['adapters']['s3'];
        $clientConfig = [
            'credentials' => [
                'key'    => $config['key'],
                'secret' => $config['secret'],
            ],
            'region'      => $config['region'],
            'version'     => $config['version'],
        ];

        self::$adapters['s3'] = new AwsS3Adapter(
            new S3Client($clientConfig),
            $config['bucket'],
            $config['dir']
        );

        return self::$adapters['s3'];
    }
protected function s3Adapter(): AwsS3Adapter
    {
        if (isset(self::$adapters['s3'])) {
            return self::$adapters['s3'];
        }

        $config       = $this->app->config()['filesystem']['adapters']['s3'];
        $clientConfig = [
            'credentials' => [
                'key'    => $config['key'],
                'secret' => $config['secret'],
            ],
            'region'      => $config['region'],
            'version'     => $config['version'],
        ];

        self::$adapters['s3'] = new AwsS3Adapter(
            new S3Client($clientConfig),
            $config['bucket'],
            $config['dir']
        );

        return self::$adapters['s3'];
    }
protected function s3Adapter ( ) : AwsS3Adapter { if ( isset ( self :: $ adapters [ 's3' ] ) ) { return self :: $ adapters [ 's3' ] ; } $ config = $ this -> app -> config ( ) [ 'filesystem' ] [ 'adapters' ] [ 's3' ] ; $ clientConfig = [ 'credentials' => [ 'key' => $ config [ 'key' ] , 'secret' => $ config [ 'secret' ] , ] , 'region' => $ config [ 'region' ] , 'version' => $ config [ 'version' ] , ] ; self :: $ adapters [ 's3' ] = new AwsS3Adapter ( new S3Client ( $ clientConfig ) , $ config [ 'bucket' ] , $ config [ 'dir' ] ) ; return self :: $ adapters [ 's3' ] ; }
Get the s3 flysystem adapter.

@throws \InvalidArgumentException

@return \League\Flysystem\AwsS3v3\AwsS3Adapter
Get the s3 flysystem adapter .