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

36 lines
777 B
PHP
Raw Normal View History

2019-04-24 18:46:41 +00:00
<?php
namespace App\Providers;
2019-09-24 14:02:39 +00:00
use Aws\S3\S3Client;
2019-07-17 09:31:30 +00:00
use Illuminate\Support\Facades\Schema;
2019-04-24 18:46:41 +00:00
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
2019-07-17 09:31:30 +00:00
public function boot(){
Schema::defaultStringLength(191);
}
2019-04-24 18:46:41 +00:00
/**
* Register any application services.
*
* @return void
*/
public function register()
{
2019-09-24 14:02:39 +00:00
$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;
});
2019-04-24 18:46:41 +00:00
}
}