pixelfed/app/Http/Controllers/MobileController.php
2022-09-28 22:29:16 -06:00

30 lines
820 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Cache;
use App\Page;
use View;
class MobileController extends Controller
{
public function terms(Request $request)
{
$page = Cache::remember('site:terms', now()->addDays(120), function() {
$slug = '/site/terms';
return Page::whereSlug($slug)->whereActive(true)->first();
});
return View::make('mobile.terms')->with(compact('page'))->render();
}
public function privacy(Request $request)
{
$page = Cache::remember('site:privacy', now()->addDays(120), function() {
$slug = '/site/privacy';
return Page::whereSlug($slug)->whereActive(true)->first();
});
return View::make('mobile.privacy')->with(compact('page'))->render();
}
}