An easy way to search for and purchase domains from GoDaddy.com
betapeak/laravel-godaddy is a Laravel package for an easy way to search for and purchase domains from godaddy.com.
It currently has 18 GitHub stars and 133 downloads on Packagist (latest version 1.0.3).
Install it with composer require betapeak/laravel-godaddy.
Discover more Laravel packages by betapeak
or browse all Laravel packages to compare alternatives.
Last updated
$availability = GoDaddy::available('my-dream-website.com');
if($availability->getAvailable() === true){
GoDaddy::purchase('my-dream-website.com');
}
This package requires that you are using Laravel 5.3 or above.
You can install it with composer like so:
composer require betapeak/laravel-godaddy
If you are using Laravel 5.3 or 5.4, you will need to add the service provider and facade to your /config/app.php:
/config/app.php
...
'providers' => [
...,
BetaPeak\GoDaddy\GoDaddyServiceProvider::class
],
'aliases' => [
...,
'GoDaddy' => BetaPeak\GoDaddy\GoDaddyFacade::class
],
...
Finally, you need to publish the config file:
php artisan vendor:publish --provider="BetaPeak\GoDaddy\GoDaddyServiceProvider"
and you must enter your key and secret which can be generated from GoDaddy's website. The config file is located at /config/laravel-godaddy.php.
NOTE: If you are planning to use the package to purchase domains in production, make sure you change your company details inside the config file as well. You need to generate production API keys from the reseller website.
$result = GoDaddy::available('example.com');
if($result->getAvailable() === true)
{
\\ Yey, ready to be bought!
} else {
\\ Not available
}
GoDaddy::purchase('example.com' );
GoDaddy::purchase('example.com', 2);
GoDaddy::purchase('example.com', 1, true);
GoDaddy::purchase('example.com', 1, false, 'some-x-seller-id');
A list of all available methods and models can be found here.