blessing-skin-server/app/Http/Middleware/CheckAdministrator.php
2019-04-19 19:36:36 +08:00

14 lines
247 B
PHP

<?php
namespace App\Http\Middleware;
class CheckAdministrator
{
public function handle($request, \Closure $next)
{
abort_unless(auth()->user()->isAdmin(), 403, trans('auth.check.admin'));
return $next($request);
}
}