zonename){ return view('createzone'); } $zone_name = $createzone_req->zonename; $zone_ttl = $createzone_req->zonettl; $zone_primary_ip = $createzone_req->primaryip; $client = new Client(); //GuzzleHttp\Client $result = $client->post('http://127.0.0.1:8081/api/v1/servers/localhost/zones', [ \GuzzleHttp\RequestOptions::JSON => [ 'kind' => 'Native', 'masters' => [], 'name' => $zone_name . '.', 'nameservers' => [ 'ns1.tfmm.co.' ], 'rrset' => [ [ 'name' => $zone_name . '.', 'ttl' => '86400', 'type' => 'SOA', 'changetype' => 'replace', 'records' => [ [ 'content' => 'pdnstest.tfmm.co. hostmaster.tfmm.co. 2018033001 1800 900 604800 86400', 'disabled' => false ] ] ], [ 'name' => $zone_name . '.', 'ttl' => '3600', 'type' => 'A', 'changetype' => 'replace', 'records' => [ [ 'content' => $zone_primary_ip, 'disabled' => false ] ] ] ] ], 'headers' => [ 'X-API-Key' => 'JgTtTq6EFVeo7X71wOVCYQk3rOie2G1k' ] ]); return redirect('createzone'); } public function domains(Request $domain_req) { return view('domains'); } public function newrecord(Request $newrec_req) { return view('newrecord'); } public function updaterecord(Request $updaterec_req) { return view('updaterecord'); } }