itainathaniel/nova-nexmo

Laravel Nova card & tool to interact with Nexmo.com


Keywords
nova, laravel, nexmo, laravel-nova
License
MIT

Documentation

Nova Nexmo

A card & tool for interacting with Nexmo

Latest Version on Packagist Total Downloads

screenshot of the balance card

screenshot of the sending SMS tool

Installation

This package relies on Nexmo's Laravel package. If you hadn't installed it already, do that now and follow their instructions, up until the end, where you have Nexmo's key & secret in your config/nexmo.php file.

Install the package in to a Laravel app that uses Nova via composer:

composer require itainathaniel/nova-nexmo

Now you can register the sending SMS tool, the balance card or the two of them in your App\Providers\NovaServiceProvider.

To register the sending SMS tool, do the following:

// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        new \Itainathaniel\NovaNexmo\NovaNexmoTool(),
    ];
}

To register the balance card, do this:

// in app/Providers/NovaServiceProvider.php

// ...

public function cards()
{
    return [
        // ...
        new \Itainathaniel\NovaNexmo\NovaNexmoCard(),
    ];
}

You can cntroll the number of digits after the decimal point by registering the card with the decimals() function, like so:

	(new \Itainathaniel\NovaNexmo\NovaNexmoCard())->decimals(4),

The default number of digits is 2, Nexmo support up to 4 digits.

Security

If you discover any security related issues, please email itainathaniel@gmail.com or use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.