Skip to content

Commit

Permalink
naming stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Bader Al-Mutairi authored and Bader Al-Mutairi committed Jul 31, 2018
1 parent d7ff826 commit 194cb89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/Visits.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class Visits
*/
public function __construct($subject = null, $tag = 'visits')
{
$config = config('bareq');
$this->redis = Redis::connection($this->connection());
$config = config('visits');
$this->redis = Redis::connection($config['connection']);
$this->periods = $config['periods'];
$this->ipSeconds = $config['remember_ip'];
$this->fresh = $config['always_fresh'];
Expand All @@ -59,11 +59,6 @@ public function __construct($subject = null, $tag = 'visits')
$this->periodsSync();
}

public function connection()
{
return config('database.redis.laravel-visits') !== null ? 'laravel-visits' : null;
}

/**
* Return fresh cache from database
* @return $this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function boot()
public function register()
{
$this->mergeConfigFrom(
__DIR__.'/config/visits.php', 'bareq'
__DIR__.'/config/visits.php', 'visits'
);
}
}

0 comments on commit 194cb89

Please sign in to comment.