芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/rentandbuyrealty.com/app/Http/Middleware/DemoMiddleware.php
getRequestUri(); $exclude_uri = array( '/login', '/logout' ); // dd(Auth::user()->email != 'superadmin@gmail.com'); if (env('DEMO_MODE') && Auth::user() && Auth::user()->email != 'superadmin@gmail.com') { // dd(!in_array($request->getRequestUri(), $exclude_uri)); if (!$request->isMethod('get') && !in_array($request->getRequestUri(), $exclude_uri)) { if ($request->ajax()) { $response['error'] = false; $response['message'] = 'This is not allowed in the Demo Version'; return response()->json($response); } else if (request()->wantsJson() || Str::startsWith(request()->path(), 'api')) { $response['error'] = false; $response['message'] = 'This is not allowed in the Demo Version'; return response()->json($response); } else { return back()->with('error', 'This is not allowed in the Demo Version'); } } } return $next($request); } }