Find below the controller code, Here I'm getting the data's passed in the url and I need the data entered through the form to be displayed / printed in the view page..
Controller Code:
public function create(Request $request)
{
$domainname = Input::get('domainname');
$tld = Input::get('tld');
$url='https://httpapi.com/api/domains/available.json?auth-userid=711757&api-key=74miSZPgYkkc108Ptmeo5Q8iDTtKk3xi&domain-name=';
$ch = curl_init($url.$domainname.'&tlds='.$tld);
711757&api-key=74miSZPgYkkc108Ptmeo5Q8iDTtKk3xi&domain-name='.$domainname.'&tlds='.$tld.'&suggest-alternative=true');
$result = curl_exec($ch);
$final_data = json_decode($result,true);
dd($final_data);
return view('clientlayout.main.tld',compact('final_data'));
}
tld.blade.php:
When I use the above code to print the data in view page, it just prints as "11".
Route code:
Route::get('tld','TldController@create')->name('domain.create');
Kindly help me with this to solve the issue and print the data in the view page.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire