Trying to get the view and put it in array container. I used this code but unfortunately not working:
$data['list'] = User::get();
return response()->json(['view' => view('table-data', $data), 'count'=>10]);
//output is:
{"view":{},"count":10}
//view is null
I want to get the view and render as $('tbody').html(view); Thanks