protected function preparePath() { $path = $this->route->getPath(); if ($path === '/') { return $path; } return trim($path, '/'); }