forked from mirror/pixelfed
Update PageController
This commit is contained in:
parent
e3cfd8170f
commit
7ade78b4ee
|
@ -38,6 +38,9 @@ class PageController extends Controller
|
||||||
'page' => 'required|string'
|
'page' => 'required|string'
|
||||||
]);
|
]);
|
||||||
$slug = urldecode($request->page);
|
$slug = urldecode($request->page);
|
||||||
|
if(in_array($slug, array_keys($this->cacheKeys())) == false) {
|
||||||
|
return redirect(route('admin.settings.pages'));
|
||||||
|
}
|
||||||
$page = Page::firstOrCreate(['slug' => $slug]);
|
$page = Page::firstOrCreate(['slug' => $slug]);
|
||||||
return view('admin.pages.edit', compact('page'));
|
return view('admin.pages.edit', compact('page'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue