File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11<?php namespace Aws \Laravel ;
22
33use Aws \Sdk ;
4+ use Illuminate \Foundation \Application as LaravelApplication ;
45use Illuminate \Support \ServiceProvider ;
6+ use Laravel \Lumen \Application as LumenApplication ;
57
68/**
79 * AWS SDK for PHP service provider for Laravel applications
@@ -26,8 +28,10 @@ public function boot()
2628 {
2729 $ source = realpath (__DIR__ . '/../config/aws.php ' );
2830
29- if (class_exists ( ' Illuminate\Foundation\Application ' , false )) {
31+ if ($ this -> app instanceof LaravelApplication && $ app -> runningInConsole ( )) {
3032 $ this ->publishes ([$ source => config_path ('aws.php ' )]);
33+ } elseif ($ this ->app instanceof LumenApplication) {
34+ $ app ->configure ('aws ' );
3135 }
3236
3337 $ this ->mergeConfigFrom ($ source , 'aws ' );
@@ -41,7 +45,8 @@ public function boot()
4145 public function register ()
4246 {
4347 $ this ->app ->singleton ('aws ' , function ($ app ) {
44- $ config = $ app ['config ' ]->get ('aws ' );
48+ $ config = $ app ->make ('config ' )->get ('aws ' );
49+
4550 return new Sdk ($ config );
4651 });
4752
You can’t perform that action at this time.
0 commit comments