Replacing incorrect isRest controller boolean with request->is()