1
0
Fork 0
pixelfed/app/Http/Controllers/MobileController.php

30 lines
820 B
PHP
Raw Normal View History

2022-09-29 04:29:16 +00:00
<?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();
}
}