Skip to content
Advertisement

pass additional data to laravel resource

i need to pass My custom data to the same level of array of resource but it goes out of array

JavaScript

json output

enter image description here

Advertisement

Answer

Because additional is for top-level data, use concat instaed.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement