From 951cd4924e13f89e6dfce2bbe6849ecdc8c5e275 Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sun, 14 Feb 2021 18:01:24 +0000 Subject: [PATCH] Shift config files --- config/app.php | 2 ++ config/cache.php | 12 +++++++++++- config/database.php | 18 +++++++++++++++++- config/mail.php | 2 +- config/queue.php | 7 ++++--- config/session.php | 8 ++++---- 6 files changed, 39 insertions(+), 10 deletions(-) diff --git a/config/app.php b/config/app.php index caac05c4..94cff7d9 100644 --- a/config/app.php +++ b/config/app.php @@ -179,6 +179,8 @@ return [ */ 'aliases' => [ + 'Str' => Illuminate\Support\Str::class, + 'Arr' => Illuminate\Support\Arr::class, 'App' => Illuminate\Support\Facades\App::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, diff --git a/config/cache.php b/config/cache.php index 4f0b3c45..46751e62 100644 --- a/config/cache.php +++ b/config/cache.php @@ -13,7 +13,8 @@ return [ | using this caching library. This connection is used when another is | not explicitly specified when executing a given caching function. | - | Supported: "apc", "array", "database", "file", "memcached", "redis" + | Supported: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb" | */ @@ -75,6 +76,15 @@ return [ 'connection' => 'cache', ], + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + ], /* diff --git a/config/database.php b/config/database.php index 22347a41..921769ca 100644 --- a/config/database.php +++ b/config/database.php @@ -1,5 +1,7 @@ [ 'driver' => 'sqlite', + 'url' => env('DATABASE_URL'), 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), @@ -42,6 +45,7 @@ return [ 'mysql' => [ 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), @@ -54,10 +58,14 @@ return [ 'prefix_indexes' => true, 'strict' => true, 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], ], 'pgsql' => [ 'driver' => 'pgsql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), @@ -72,6 +80,7 @@ return [ 'sqlsrv' => [ 'driver' => 'sqlsrv', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), @@ -110,9 +119,15 @@ return [ 'redis' => [ - 'client' => 'predis', + 'client' => env('REDIS_CLIENT', 'predis'), + + 'options' => [ + 'cluster' => env('REDIS_CLUSTER', 'predis'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + ], 'default' => [ + 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), @@ -120,6 +135,7 @@ return [ ], 'cache' => [ + 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), diff --git a/config/mail.php b/config/mail.php index f4006459..6f8469f8 100644 --- a/config/mail.php +++ b/config/mail.php @@ -12,7 +12,7 @@ return [ | your application here. By default, Laravel is setup for SMTP mail. | | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", - | "sparkpost", "log", "array" + | "sparkpost", "postmark", "log", "array" | */ diff --git a/config/queue.php b/config/queue.php index c1430b49..07c7d2a9 100644 --- a/config/queue.php +++ b/config/queue.php @@ -46,15 +46,16 @@ return [ 'host' => 'localhost', 'queue' => 'default', 'retry_after' => 90, + 'block_for' => 0, ], 'sqs' => [ 'driver' => 'sqs', - 'key' => env('SQS_KEY', 'your-public-key'), - 'secret' => env('SQS_SECRET', 'your-secret-key'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'queue' => env('SQS_QUEUE', 'your-queue-name'), - 'region' => env('SQS_REGION', 'us-east-1'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], 'redis' => [ diff --git a/config/session.php b/config/session.php index fae302ae..fbb9b4d7 100644 --- a/config/session.php +++ b/config/session.php @@ -14,7 +14,7 @@ return [ | you may specify any of the other wonderful drivers provided here. | | Supported: "file", "cookie", "database", "apc", - | "memcached", "redis", "array" + | "memcached", "redis", "dynamodb", "array" | */ @@ -92,9 +92,9 @@ return [ | Session Cache Store |-------------------------------------------------------------------------- | - | When using the "apc" or "memcached" session drivers, you may specify a - | cache store that should be used for these sessions. This value must - | correspond with one of the application's configured cache stores. + | When using the "apc", "memcached", or "dynamodb" session drivers you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". | */