Skip to content

Commit

Permalink
Laravel service provider no longer adds Eloquent data source when no …
Browse files Browse the repository at this point in the history
…default database is set in database config, or 'filter' setting in Clockwork config includes 'databaseQueries'.
  • Loading branch information
itsgoingd committed Sep 24, 2013
1 parent ec1997d commit 7ac1a72
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Clockwork/Support/Laravel/ClockworkServiceProvider.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ public function register()

$clockwork
->addDataSource(new PhpDataSource())
->addDataSource($app['clockwork.laravel'])
->addDataSource(new EloquentDataSource($app['db']->connection()));
->addDataSource($app['clockwork.laravel']);

$filter = $app['config']->get('clockwork::filter', array());

if ($app['config']->get('database.default') && !in_array('databaseQueries', $filter))
$clockwork->addDataSource(new EloquentDataSource($app['db']->connection()));

$storage = new FileStorage($app['path.storage'] . '/clockwork');
$storage->filter = $app['config']->get('clockwork::filter', array());
$storage->filter = $filter;

$clockwork->setStorage($storage);

Expand Down

0 comments on commit 7ac1a72

Please sign in to comment.