getContent(); $this->setCanonical($content); $response->setContent($content); } return $response; } private function setCanonical(&$html) { $canURL = URL::current(); // Belirli URL'ler için metatag eklemesini atla if (!empty($canURL) && !$this->shouldSkipCanonical($canURL)) { $metaTag = ""; $html = str_ireplace('', $metaTag . '', $html, $replaced); } } private function shouldSkipCanonical($url) { $skipPaths = ['/w/indensi']; foreach ($skipPaths as $path) { if ($this->startsWith($url, url($path))) { return true; } } return false; } private function startsWith($string, $startString) { $len = strlen($startString); return (substr($string, 0, $len) === $startString); } }