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

22 lines
414 B
PHP

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