Update SiteController

This commit is contained in:
Daniel Supernault 2019-09-24 00:54:17 -06:00
parent 813703af94
commit fe522da8db
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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();
}
}