for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace awssat\Visits\Traits;
trait Setters
{
/**
* Return fresh cache from database
* @return $this
*/
public function fresh()
$this->fresh = true;
fresh
return $this;
}
* set x seconds for ip expiration
*
* @param $seconds
public function seconds($seconds)
$this->ipSeconds = $seconds;
ipSeconds
* @param $country
public function country($country)
$this->country = $country;
country
* @param $referer
public function referer($referer)
$this->referer = $referer;
referer
* Change period
* @param $period
public function period($period)
if (in_array($period, array_keys($this->periods))) {
$this->keys->visits = $this->keys->period($period);