diaREact/app/Http/Controllers/GuestController.php
2022-04-14 10:49:56 +02:00

30 lines
624 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class GuestController extends Controller
{
public function home()
{
return view('guest.welcome');
}
public function faq($locale)
{
$view = sprintf('guest.faq-%s', $locale);
if (!View::exists($view)) {
throw new NotFoundHttpException(sprintf('FAQ for locale « %s » doesn\'t exist.', $locale));
}
return view($view);
}
public function privacy()
{
return view('guest.privacy');
}
}