Tried merging two JSON responses into a single one but the problem is the data is displayed in two arrays and I want it in a single array. How do I achieve it in Lumen/Laravel
Tried contatinating two arrays or responses
 public function index(Request $request)
    {
        $post = Post::orderBy('id', 'DESC')->get();
        $post_images = PostImage::orderBy('id', 'DESC')->get();
        return $this->successResponse($posts.$post_image );        
    }
Expected:-
{
    "post": {
        "id": 14,
        "post_id": 798965728,
        "user_id": 1,
        "location": "first",
        "title": "un8852",
        "cooked_time": "1554329910",
        "dispose_time": "1554373110",
        "food_type": "nv",
        "description": "asdfg",
        "serve_quantity": 23,
        "lat": 19.08,
        "lon": 73,    
        "id": 10,
        "post_id": 798965728,
        "image_name1": null,
        "image_name2": null,
        "image_name3": null,
        "image_name4": null,
        "image_name5": null,
    },
    "st": "1",
    "msg": "success"
}
Got:-
{
   "post":"{\"id\":14,\"post_id\":798965728,\"user_id\":1,\"location\":\"first\",\"title\":\"un8852\",\"cooked_time\":\"1554329910\",\"dispose_time\":\"1554373110\",\"food_type\":\"nv\",\"description\":\"asdfg\",\"serve_quantity\":23,\"lat\":19.08,\"lon\":73,\"created_at\":\"2019-04-04 10:20:18\",\"updated_at\":\"2019-04-04 10:20:18\"}{\"id\":10,\"post_id\":798965728,\"image_name1\":null,\"image_name2\":null,\"image_name3\":null,\"image_name4\":null,\"image_name5\":null,\"created_at\":\"2019-04-04 10:20:18\",\"updated_at\":\"2019-04-04 10:20:18\"}",
   "st":"1",
   "msg":"success"
}
 
     
     
    