Giter VIP home page Giter VIP logo

laravel-godaddy's Introduction

Latest Stable Version License Total Downloads

Laravel GoDaddy

Easy and simple GoDaddy API service for your Laravel project

$availability = GoDaddy::available('my-dream-website.com');

if($availability->getAvailable() === true){
    GoDaddy::purchase('my-dream-website.com');
}

Installation

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.

If you are planning to use the package to purchase domains, make sure you change your company details inside the config file as well.

Example usage

Checking if a domain is available for purchase

    $result = GoDaddy::available('example.com');
    
    if($result->getAvailable() === true)
    {
        \\ Yey, ready to be bought!
    } else {
        \\ Not available
    }

Purchasing a domain

GoDaddy::purchase('example.com' );

Purchasing a domain for two years

GoDaddy::purchase('example.com', 2);

Purchasing a domain with automatic renewal (defaults to false)

GoDaddy::purchase('example.com', 1, true);

Purchasing a domain as a reseller

GoDaddy::purchase('example.com', 1, false, 'some-x-seller-id');

Full docs

A list of all available methods and models can be found here.

laravel-godaddy's People

Contributors

ymslavov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.