Ekapp/skolehjem/app/Http/Controllers/AboutController.php

39 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2020-08-12 11:08:47 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class AboutController extends Controller
{
2021-05-21 10:28:38 +00:00
//Check authentication and languages settings
2020-08-18 10:33:04 +00:00
public function __construct()
{
2021-05-21 10:28:38 +00:00
//The middleware is being run just before the pages is getting loaded
2020-08-18 10:33:04 +00:00
$this->middleware(["auth"]);
$this->middleware(["lang"]);
}
2021-05-21 10:28:38 +00:00
/*
Index controller, all backend work for the about index
pages is done here.
*/
2020-08-12 11:08:47 +00:00
public function index(Request $request)
{
2021-05-21 10:28:38 +00:00
/*
Response::detect is a library that we use to
detect if you are on mobile or desktop.
If you are on mobile it sends you to the
/resources/views/app/about/index
and if you are on desktop it sends you to
/resources/views/admin/about/index (There is no "about" on desktop view).
Normally the index pages only contain the return of the index pages
but you are allowed to modify the index function to how may like.
*/
2020-08-12 11:08:47 +00:00
return Response::detect("about.index");
}
}