Skip to content

Commit

Permalink
Fix configuration syntax, thought this would still honor the service …
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
wtfzdotnet committed Nov 24, 2014
1 parent 7d164a9 commit 7c8c048
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Wtfz/TmdbPackage/TmdbServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use Illuminate\Support\ServiceProvider;
use Symfony\Component\Process\Exception\RuntimeException;
use Tmdb\ApiToken;

class TmdbServiceProvider extends ServiceProvider {

Expand Down Expand Up @@ -41,13 +42,13 @@ public function register()
});

$this->app['Tmdb'] = $this->app->share(function($app) {
$config = $app['config']->get('tmdb::config');
$config = $app['config']->get('tmdb-package::config');

if (!array_key_exists('api_key', $config) || empty($config['api_key'])) {
throw new RuntimeException('The TMDB api_key should be set in your configuration.');
throw new \RuntimeException('The TMDB api_key should be set in your configuration.');
}

$token = new \Tmdb\ApiToken($config['api_key']);
$token = new ApiToken($config['api_key']);
$client = new Tmdb($token);

if ($config['cache']['enabled']) {
Expand Down

0 comments on commit 7c8c048

Please sign in to comment.