Unverified Commit adbca712 authored by Nicolas Widart's avatar Nicolas Widart Committed by GitHub

Merge pull request #568 from ChristianGiupponi/3.0

Check page slug and locale
parents 6d1bdc23 785f1b29
......@@ -38,6 +38,12 @@ class PublicController extends BasePublicController
$this->throw404IfNotFound($page);
$currentTranslatedPage = $page->getTranslation(locale());
if ($slug !== $currentTranslatedPage->slug) {
return redirect()->to($currentTranslatedPage->locale . '/' . $currentTranslatedPage->slug, 301);
}
$template = $this->getTemplateForPage($page);
return view($template, compact('page'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment