1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-26 09:46:49 +00:00
pixelfed/app/Http/Controllers/MobileController.php
2022-09-28 22:29:16 -06:00

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