From 7dcb8e280c2dd446991188eeabe64683bf5c38f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Tue, 4 Oct 2016 11:33:38 +0200 Subject: [PATCH] FIX: fix exception when accessing protected page --- app/Http/Controllers/Visitor/ContentPage.php | 3 ++- .../Binarity/Resources/views/visitor/errors/layout.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Visitor/ContentPage.php b/app/Http/Controllers/Visitor/ContentPage.php index f7596c0a..a4e4f3fb 100644 --- a/app/Http/Controllers/Visitor/ContentPage.php +++ b/app/Http/Controllers/Visitor/ContentPage.php @@ -47,7 +47,8 @@ class ContentPage extends Controller { // test if loaded page is visible or not if ($page->status == Content::STATUS_PROTECTED && !Auth::user()) { - throw new \Exception('Cannot access protected resources'); +// throw new \Exception('Cannot access protected resources'); + abort(404); } // add one new "view" for page diff --git a/templates/Binarity/Resources/views/visitor/errors/layout.blade.php b/templates/Binarity/Resources/views/visitor/errors/layout.blade.php index 01b8b578..9d867acc 100644 --- a/templates/Binarity/Resources/views/visitor/errors/layout.blade.php +++ b/templates/Binarity/Resources/views/visitor/errors/layout.blade.php @@ -27,7 +27,7 @@ } header { - background: #8aa800; + background: #7cad2a; padding: 30px 0; } @@ -56,7 +56,7 @@ @yield('content') -