isMethod('POST') || $request->isMethod('PUT') || $request->isMethod('DELETE')){ if (in_array($request->route()->uri, $routeArray)) { $notify[] = ['error', 'In the demo version, You can not do anything with this option']; return back()->withNotify($notify); } } } return $next($request); } }