composer require lasserafn/dinero
After composer has updated, add the service provider to your config/app.php
file, in the $providers
variable
$providers = [
Dinero\Api\Providers\DineroServiceProvider::class
];
$aliases = [
'Dinero' => Dinero\Api\Support\Facades\Dinero::class
];
php artisan vendor:publish
The most important part is client id
, client token
and api key
. Using the wrapper without will result in errors.
<?php namespace App\Http\Controllers;
use Dinero;
class DineroController extends Controller
{
function getInvoice($id)
{
return view('dashboard.pages.invoice', [
'invoice' => Dinero::getInvoice($id)
]);
}
}