mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
19 lines
327 B
PHP
19 lines
327 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
use App\Models\User;
|
|
|
|
class CheckSuperAdmin
|
|
{
|
|
public function handle($request, Closure $next)
|
|
{
|
|
if (auth()->user()->permission != User::SUPER_ADMIN) {
|
|
abort(403, trans('auth.check.super-admin'));
|
|
}
|
|
|
|
return $next($request);
|
|
}
|
|
}
|