Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Improved environment specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Nov 13, 2015
1 parent 544110f commit 53c8650
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/InstagramServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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');
}

Expand Down

0 comments on commit 53c8650

Please sign in to comment.