koel/app/Providers/ObjectStorageServiceProvider.php
2018-08-29 11:06:17 +07:00

18 lines
401 B
PHP

<?php
namespace App\Providers;
use AWS;
use Aws\AwsClientInterface;
use Aws\S3\S3ClientInterface;
use Illuminate\Support\ServiceProvider;
class ObjectStorageServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->bind(S3ClientInterface::class, static function (): AwsClientInterface {
return AWS::createClient('s3');
});
}
}