1
0
Fork 0

Update SiteController

This commit is contained in:
Daniel Supernault 2019-06-19 20:54:27 -06:00
parent ef07e31d9a
commit aca5114fcb
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 18 additions and 0 deletions

View File

@ -69,4 +69,22 @@ class SiteController extends Controller
return view('site.help.community-guidelines', compact('page'));
}
public function privacy(Request $request)
{
return Cache::remember('site:privacy', now()->addMinutes(120), function() {
$slug = '/site/privacy';
$page = Page::whereSlug($slug)->whereActive(true)->first();
return View::make('site.privacy')->with(compact('page'))->render();
});
}
public function terms(Request $request)
{
return Cache::remember('site:terms', now()->addMinutes(120), function() {
$slug = '/site/terms';
$page = Page::whereSlug($slug)->whereActive(true)->first();
return View::make('site.terms')->with(compact('page'))->render();
});
}
}