1. Go to this page and download the library: Download dnj/laravel-account library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
// Define your user model class for connect accounts to users. Example: App\User:class
'user_model' => null,
// Enable http restful routes.
'route_enable' => true,
// Prefix of routes. By default routes register with /api/{prefix}/{accounts|transactions} pattern.
'route_prefix' => null,
];
use dnj\Account\Contracts\ITransactionManager;
use dnj\Account\Contracts\ITransaction;
$transactionManager = app(ITransactionManager::class);
/**
* @var ITransaction $rollbackTransaction new transaction that just made for rollback
*/
$rollbackTransaction = $transactionManager->rollback(55);