laravel-learn-bbs/app/Http/Controllers/PagesController.php

21 lines
494 B
PHP
Raw Permalink Normal View History

2017-12-30 15:45:21 +00:00
<?php
namespace App\Http\Controllers;
class PagesController extends Controller
{
public function root()
{
return view('layouts.root');
}
2018-06-02 08:28:28 +00:00
public function permissionDenied()
{
2018-06-02 09:09:43 +00:00
$is_allow = config('administrator.permission');
if (($is_allow && is_callable($is_allow) && $is_allow() === true) || $is_allow === true) {
2018-06-02 08:28:28 +00:00
return redirect(url(config('administrator.uri')), 302);
}
return view('pages.permission_denied');
}
2017-12-30 15:45:21 +00:00
}