diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 6739082..c6b4839 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -11,7 +11,8 @@ class PagesController extends Controller public function permissionDenied() { - if (config('administrator.permission')) { + $is_allow = config('administrator.permission'); + if (($is_allow && is_callable($is_allow) && $is_allow() === true) || $is_allow === true) { return redirect(url(config('administrator.uri')), 302); } return view('pages.permission_denied');