Return multiple array to Response::json laravel? Return multiple array to Response::json laravel? json json

Return multiple array to Response::json laravel?


i think you can try this method:

$user= User::all()->toArray();$post= Post::all()->toArray();$comment= Comment:all()->toArray();Response::json(['user'=>$user,'post'=>$post,'comment'=>$comment]);