/** * Hit the throttle. * * @return $this */ public function hit() { if ($this->count()) { $this->store->increment($this->key); $this->number++; } else { $this->store->put($this->key, 1, $this->time); $this->number = 1; } return $this; }
/** * Increment the value of an item in the cache. * * @param string $key * @param mixed $value * @return void */ public function increment($key, $value = 1) { $this->store->increment($this->taggedItemKey($key), $value); }
/** * Increment the value of an item in the cache. * * @param string $key * @param mixed $value * * @return void */ public function increment($key, $value = 1) { $this->store->increment($key, $value); }
/** * Increment the login attempts for the user. * @param Request $request * @return int */ protected function incrementLoginAttempts(Request $request, Cache $cache) { $cache->add($key = $this->loginAttemptsKey($request), 1, 1); return (int) $cache->increment($key); }