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

22 lines
414 B
PHP
Raw Normal View History

2020-06-08 13:08:46 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
2020-06-24 06:23:15 +00:00
use Illuminate\Http\Response;
2020-06-08 13:08:46 +00:00
class RootController extends Controller
{
2020-06-30 08:42:10 +00:00
function __construct()
{
$this->middleware("auth");
}
2020-06-08 13:08:46 +00:00
public function index() {
2020-07-29 10:18:08 +00:00
if(auth()->user()->can('admin.panel.show'))
return Response::detect("root.index");
else
return view('app.root.index');
2020-06-08 13:08:46 +00:00
}
}