芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/app/Http/Middleware/Admin/RoleDeleteGuard.php
validate([ 'target' => 'required|numeric', ]); $role = AdminRole::find($request->target); if(!$role) return back()->with(['error' => ['Target role not found!']]); if($role->name == AdminRoleConst::SUPER_ADMIN) { return back()->with(['error' => ['Super admin role can\'t deletable.']]); } return $next($request); } }