diff --git a/app/Controllers/PageController.php b/app/Controllers/PageController.php index 23f3bee..7b809a8 100644 --- a/app/Controllers/PageController.php +++ b/app/Controllers/PageController.php @@ -38,8 +38,8 @@ class PageController extends DirectusControllerAbstract $repository = Manager::get('Page'); $page = $repository->findOneBySlug($slug); - if ($page['data'] === NULL) { - $this->app>redirect('/404', 301); + if (count($page['data']) === 0) { + $this->app->redirect('/404', 301); } else { $this->render($page); } diff --git a/resources/views/page/default.blade.php b/resources/views/page/default.blade.php index 251ed8d..0b951e8 100644 --- a/resources/views/page/default.blade.php +++ b/resources/views/page/default.blade.php @@ -1,5 +1,9 @@ @extends('layout') +@php +var_dump($page); die(); +@endphp + @inject('markdownHelper', 'App\Helpers\MarkdownHelper') @section('content')