Skip to content

Commit

Permalink
Merge pull request antonioribeiro#304 from 666/master
Browse files Browse the repository at this point in the history
Prevent console commands from being tracked - Fix antonioribeiro#227
  • Loading branch information
antonioribeiro authored Jul 31, 2017
2 parents f1dbb4f + 74406aa commit 140ccea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ protected function isTrackable()
{
return $this->config->get('enabled') &&
$this->logIsEnabled() &&
$this->notConsole() &&
$this->parserIsAvailable() &&
$this->isTrackableIp() &&
$this->isTrackableEnvironment() &&
Expand Down Expand Up @@ -399,6 +400,11 @@ public function pageViewsByCountry($minutes, $results = true)
return $this->dataRepositoryManager->pageViewsByCountry(Minutes::make($minutes), $results);
}

public function notConsole()
{
return $this->laravel->runningInConsole();
}

public function parserIsAvailable()
{
if (!$this->dataRepositoryManager->parserIsAvailable()) {
Expand Down

0 comments on commit 140ccea

Please sign in to comment.