1. Go to this page and download the library: Download abather/mini-accounting 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/ */
namespace App\Models;
use Abather\MiniAccounting\Traits\HasAccountMovement;
use Illuminate\Database\Eloquent\Model;
class System extends Model
{
use HasAccountMovement;
// Your code
}
$system->deposit("Description Of The Transaction", 350, $bill);
$system->deposit("Description Of The Transaction", 350, $bill, "Extra Notes", $json);
$system->balance
$system->balanceAtEndOfMonth(10)
// Returns the system balance at the end of month 10
$system->balanceAtEndOfYear()
// Returns the system balance at the end of this year
namespace App\Models;
use Abather\MiniAccounting\Contracts\Referencable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Bill extends Model implements Referencable
{
use \Abather\MiniAccounting\Traits\Referencable;
use HasFactory;
public function defaultTransactions(): array
{
return [];
}
}