PHP code example of netinternet / logicboxes

1. Go to this page and download the library: Download netinternet/logicboxes library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

netinternet / logicboxes example snippets


php artisan vendor:publish
 

    return [
        'mode' => env('LOGICBOXES_ENV', 'test'),
        'auth-userid' => env('LOGICBOXES_AUTHID'),
        'api-key' => env('LOGICBOXES_APIKEY')
    ];

use Logicboxes;
// With Facade
public function myMethod()
{
	return Logicboxes::domain('domain-name.tld')->ns();
}

public function myMethod()
{
	return logicboxes()->domain('domain-name.tld')->ns();
}

// get domain nameservers.
logicboxes()->domain('domain-name.tld')->nameservers();
// get domain nameservers short.
logicboxes()->domain('domain-name.tld')->ns();
// get domains all details.
logicboxes()->domain('domain-name.tld')->details();
// get domains status
logicboxes()->domain('domain-name.tld')->status();
// get domains order details
logicboxes()->domain('domain-name.tld')->order();
// get domains dnssec details
logicboxes()->domain('domain-name.tld')->dnssec();
// get domains contact id list.
logicboxes()->domain('domain-name.tld')->contact()->ids();
// get domains registrant contact details
logicboxes()->domain('domain-name.tld')->contact()->registrant();
// get domains admin contact details
logicboxes()->domain('domain-name.tld')->contact()->admin();
// get domains tech contact details
logicboxes()->domain('domain-name.tld')->contact()->tech();
// get domains billing contact details
logicboxes()->domain('domain-name.tld')->contact()->billing();
// check for domain
logicboxes()->domain('domain-name')->check(['com','net'])
// first parameter is array of tlds and second parameter domain suggessions as a boolean. Default is false.
// and you can also set  domain index as third parameter for getting immediate domain status without result
//object 

// Creating a customer
logicboxes()->customer()->create([
	'username' =>  $this->faker->email,
	'passwd' => 'Qs3jiA5fd8mq4',
	'name' => $this->faker->name,
	'company' => $this->faker->company,
	'address-line-1' => $this->faker->streetAddress,
	'city' => $this->faker->city,
	'state' => $this->faker->state,
	'country' => $this->faker->countryCode,
	'zipcode' => $this->faker->postcode,
	'phone-cc' => 90,
	'phone' => 5555555555,
	'lang-pref' => 'en'
]);

// getting a customer by email or id
logicboxes()->customer()->get('[email protected]')
//or by id
logicboxes()->customer()->get(17939294)
// Changing customers password
logicboxes()->customer()->get('[email protected]','myNew8CharPassword')
// Change customer
logicboxes()->customer()->moveProduct("[email protected]", 'old-customer-id', 'new-customer-id, 'old-contact');
js
'Logicboxes' => Netinternet\Logicboxes\Facades\Logicboxes::class,