url = $url; } /** * Execute the job. * * @return void */ public function handle() { $urlStat = UrlStats::query() ->whereDate('date', now()) ->firstOrNew( [ 'url_key' => $this->url->key, 'url' => $this->url->value, ], ); $urlStat->calls += 1; $urlStat->saveOrFail(); Log::debug(sprintf('Stats incremented for URL : %s', $this->url->key)); } }