This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccount/app/Providers/AppServiceProvider.php
2019-09-24 16:02:39 +02:00

35 lines
777 B
PHP

<?php
namespace App\Providers;
use Aws\S3\S3Client;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function boot(){
Schema::defaultStringLength(191);
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->singleton(S3Client::class, function() {
$s3 = new S3Client([
'region' => 'eu-west-1',
'version' => 'latest',
'credentials' => [
'key' => getenv("S3_ACCESS_KEY"),
'secret' => getenv("S3_SECRET")
]
]);
return $s3;
});
}
}