diff --git a/src/InstagramServiceProvider.php b/src/InstagramServiceProvider.php index 006bf32..a5cbe59 100644 --- a/src/InstagramServiceProvider.php +++ b/src/InstagramServiceProvider.php @@ -12,7 +12,9 @@ namespace Vinkla\Instagram; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\ServiceProvider; +use Laravel\Lumen\Application as LumenApplication; use MetzWeb\Instagram\Instagram; /** @@ -43,9 +45,9 @@ protected function setupConfig(Application $app) { $source = realpath(__DIR__.'/../config/instagram.php'); - if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) { + if ($app instanceof LaravelApplication && $app->runningInConsole()) { $this->publishes([$source => config_path('instagram.php')]); - } elseif (class_exists('Laravel\Lumen\Application', false)) { + } elseif ($app instanceof LumenApplication) { $app->configure('instagram'); }