芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/app/Http/Middleware/Admin/AdminDeleteGuard.php
validate([ 'target' => 'required|string|exists:admins,username' ]); $admin = get_admin($request->target); $roles = $admin->getRolesCollection(); if(in_array(AdminRoleConst::SUPER_ADMIN,$roles)) { return back()->with(['warning' => ['Can\'t deletable system super admin']]); }else if($admin->username == auth()->user()->username) { return back()->with(['warning' => ['Can\'t delete account by yourself.']]); } return $next($request); } }