A card & tool for interacting with Nexmo
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.
If you discover any security related issues, please email [email protected] or use the issue tracker.
The MIT License (MIT). Please see License File for more information.