From 87bb5ca56cf4d3256618fdf047d8a3a3e811b682 Mon Sep 17 00:00:00 2001 From: Matthew Nessworthy Date: Thu, 22 Nov 2018 17:49:21 +0100 Subject: [PATCH] Align with suggested laravel config practices --- src/AwsServiceProvider.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/AwsServiceProvider.php b/src/AwsServiceProvider.php index 2f5e2b9..a3c9123 100644 --- a/src/AwsServiceProvider.php +++ b/src/AwsServiceProvider.php @@ -26,15 +26,14 @@ class AwsServiceProvider extends ServiceProvider */ public function boot() { - $source = dirname(__DIR__).'/config/aws.php'; - if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { - $this->publishes([$source => config_path('aws.php')]); + $this->publishes( + [__DIR__.'/../config/aws.php' => config_path('aws.php')], + 'aws-config' + ); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('aws'); } - - $this->mergeConfigFrom($source, 'aws'); } /** @@ -44,6 +43,11 @@ public function boot() */ public function register() { + $this->mergeConfigFrom( + __DIR__.'/../config/aws.php', + 'aws' + ); + $this->app->singleton('aws', function ($app) { $config = $app->make('config')->get('aws'); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy