diff --git a/app/Guidelines/Guidelines.php b/app/Guidelines/Guidelines.php index a47d4463..a5535f33 100644 --- a/app/Guidelines/Guidelines.php +++ b/app/Guidelines/Guidelines.php @@ -22,6 +22,24 @@ public function pages(): Collection public function page(string $slug): ?Sheet { - return $this->pages->firstWhere('slug', $slug); + $page = $this->pages->firstWhere('slug', $slug); + + if ($page) { + return $page; + } + + $renamedSlug = $this->findRenamedSlugs($slug); + + return $renamedSlug + ? $this->pages->firstWhere('slug', $renamedSlug) + : null; + } + + protected function findRenamedSlugs(string $slug): ?string + { + return match ($slug) { + 'laravel-php' => 'laravel', + default => null, + }; } }