Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle toJson properly on json resources (#30801)
At the moment when you call toJson on a Json resource it skips the `toArray` method and directly calls toJson on the Eloquent model because of the ForwardsCalls trait. This seems unwanted because if you're formatting the resource in a specific way through the toArray method you'd expect it to be honered when calling toJson I believe. toJson isn't documented on the Json Resources documentation but I still believe that this should be honered. This is technically a breaking change so I'm targeting the next release.
- Loading branch information