I got data from Restapi and These data obtained controller class . I want to insert, update, delete data with buttons on click button. I want to use 4 button in same tab so I need to do them dynamically. Can I do it without using JavaScript ?
my getHost function:
public function getHost(){
$enpoint="api/hosts/getHost";
$api= new ApiAuthController();
$url=$api->getUrl();
$headers=$api->getHeaders();
$url.=$enpoint;
$response = Http::withHeaders($headers)->post($url,[
'id'=>"11",
'hostname'=>"",
'address'=>"",
'mail'=>"",
'web'=>"",
'owner'=>"",
'contactperson'=>"",
'mapinfo'=>"",
'nimage'=>"",
'description'=>"",
'telephone'=>"",
]);
$decode=json_decode( $response->getBody());
$response=$decode->responseData;
$data['hostname']=$response->hostname;
$data['address']=$response->address;
$data['mail']=$response->mail;
$data['web']=$response->web;
$data['owner']=$response->owner;
$data['contactperson']=$response->contactperson;
$data['mapinfo']=$response->mapinfo;
$data['nimage']=$response->nimage;
$data['description']=$response->description;
$data['telephone']=$response->telephone;
return view('pages.host',$data);
}