There are many tricks to return the response in `json`.
Actually, if the returned value is an array or instance of "arrayableinterface" or "jsonableinterface" such as eloquent model, you could just return it, it'll be a json, magically.
There are following three way i have noticed performance :) Thanks. #KeepSharing