Skip to content

Commit

Permalink
Update PageController
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Jun 20, 2019
1 parent e3cfd81 commit 7ade78b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/PageController.php
Expand Up @@ -38,6 +38,9 @@ public function edit(Request $request)
'page' => 'required|string'
]);
$slug = urldecode($request->page);
if(in_array($slug, array_keys($this->cacheKeys())) == false) {
return redirect(route('admin.settings.pages'));
}
$page = Page::firstOrCreate(['slug' => $slug]);
return view('admin.pages.edit', compact('page'));
}
Expand Down

0 comments on commit 7ade78b

Please sign in to comment.