In all cases we are assuming that the response payload to pars with Styde\Enlighten\Models\ReplacesValues trait is either null or an object/array. But when we are returning just a plain string like:
return response()->json('Unsubscription was successfully', 200);
Then we get an exception coz array_intersect_key can't use the string (see attached image).
This fix will return the plain string response if we cant json decode it.
Fixes #55
In all cases we are assuming that the response payload to pars with
Styde\Enlighten\Models\ReplacesValues
trait is either null or an object/array. But when we are returning just a plain string like:Then we get an exception coz array_intersect_key can't use the string (see attached image).
This fix will return the plain string response if we cant json decode it. Fixes #55