How to send json from laravel correctly, and then take it to js? As I understand it, this code sends json to the index page, but how can js accept this json?
$even = DB::table('Table')->select('Name', 'Location')->get(); $jeven = json_encode($even); $data = ['Title'=>'заголовок', 'even'=>$jeven]; return view('index', $data);