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

Commit

Permalink
Improved Lumen support
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Oct 4, 2015
1 parent daedb49 commit 82305a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/InstagramServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,24 @@ class InstagramServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->setupConfig();
$this->setupConfig($this->app);
}

/**
* Setup the config.
*
* @param \Illuminate\Contracts\Foundation\Application $app
*
* @return void
*/
protected function setupConfig()
protected function setupConfig(Application $app)
{
$source = realpath(__DIR__.'/../config/instagram.php');

if (class_exists('Illuminate\Foundation\Application', false)) {
$this->publishes([$source => config_path('instagram.php')]);
} elseif (class_exists('Laravel\Lumen\Application', false)) {
$app->configure('instagram');
}

$this->mergeConfigFrom($source, 'instagram');
Expand Down

0 comments on commit 82305a7

Please sign in to comment.