Skip to content

Commit d2213c1

Browse files
committed
chore: custom page
1 parent f60a19e commit d2213c1

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

app/Http/Controllers/PortalController.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,15 @@ public function index()
2323
return view('portal.index', compact('content'));
2424
}
2525

26-
public function policies()
27-
{
28-
return view('portal.policies');
29-
}
30-
3126
public function customPage(string $name)
3227
{
33-
$checkName = in_array($name, [
34-
'index',
35-
'private',
36-
'policies',
37-
]);
28+
if ($name == 'index') {
29+
return redirect(fs_route(route('fresns.portal')));
30+
}
3831

3932
$viewName = "portal.{$name}";
4033

41-
if ($checkName || ! View::exists($viewName)) {
34+
if ($name == 'private' || ! View::exists($viewName)) {
4235
return Response::view('error', [
4336
'code' => 404,
4437
'message' => 'Page Not Found',

0 commit comments

Comments
 (0)