0👍
✅
ususally you want to send the response like:
class HomeController{
public function someFunc(){
...
...
return response()->json([
'array1'=> [],
'array2'=>[],
]);
}
}
Source:stackexchange.com