when I use dd($arr) in controller the decoded json data gets printed correctly. How can I pass this decoded json data into my view?
Controller Code
public function test()
{
// $sld = $request['sld'];
// $tld = $request['tld'];
$response = Curl::to('https://reseller.enom.com/interface.asp?command=check&sld=decksys&tld=info&responsetype=xml&uid=resellid&pw=resellpw')
->get();
//check if we are getting a response
$xml = simplexml_load_string($response);
$json = json_encode($xml);
$arr = json_decode($json, true);
dd($arr);
return view('clientlayout.main.test', compact('arr'));
}
Blade File:
`{{ $arr }}`
My Route file is given below:
Route::get('/test','EnomController@test');
How to solve this error?
htmlspecialchars() expects parameter 1 to be string, array given