From fe522da8db7a8b0d7c18d405abcb885f8678f35c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 24 Sep 2019 00:54:17 -0600 Subject: [PATCH] Update SiteController --- app/Http/Controllers/SiteController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/SiteController.php b/app/Http/Controllers/SiteController.php index b7d2bdb19..9d8563f25 100644 --- a/app/Http/Controllers/SiteController.php +++ b/app/Http/Controllers/SiteController.php @@ -79,19 +79,19 @@ class SiteController extends Controller public function privacy(Request $request) { - return Cache::remember('site:privacy', now()->addDays(120), function() { + $page = Cache::remember('site:privacy', now()->addDays(120), function() { $slug = '/site/privacy'; $page = Page::whereSlug($slug)->whereActive(true)->first(); - return View::make('site.privacy')->with(compact('page'))->render(); }); + return View::make('site.privacy')->with(compact('page'))->render(); } public function terms(Request $request) { - return Cache::remember('site:terms', now()->addDays(120), function() { + $page = Cache::remember('site:terms', now()->addDays(120), function() { $slug = '/site/terms'; - $page = Page::whereSlug($slug)->whereActive(true)->first(); - return View::make('site.terms')->with(compact('page'))->render(); + return Page::whereSlug($slug)->whereActive(true)->first(); }); + return View::make('site.terms')->with(compact('page'))->render(); } }