develop
HerrHase 3 years ago
parent 22cb18d47a
commit bec21cf385

@ -38,8 +38,8 @@ class PageController extends DirectusControllerAbstract
$repository = Manager::get('Page'); $repository = Manager::get('Page');
$page = $repository->findOneBySlug($slug); $page = $repository->findOneBySlug($slug);
if ($page['data'] === NULL) { if (count($page['data']) === 0) {
$this->app>redirect('/404', 301); $this->app->redirect('/404', 301);
} else { } else {
$this->render($page); $this->render($page);
} }

@ -1,5 +1,9 @@
@extends('layout') @extends('layout')
@php
var_dump($page); die();
@endphp
@inject('markdownHelper', 'App\Helpers\MarkdownHelper') @inject('markdownHelper', 'App\Helpers\MarkdownHelper')
@section('content') @section('content')

Loading…
Cancel
Save