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

23 lines
453 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class RootController extends Controller
{
function __construct()
{
$this->middleware("auth");
$this->middleware([ "lang" ]);
}
public function index() {
if(auth()->user()->can('admin.panel.show'))
return Response::detect("root.index");
else
return view('app.root.index');
}
}