cod-glo/

cgaccounting

dev-main 2024-09-29 18:25 UTC

This package is auto-updated.

Last update: 2024-09-29 18:25:56 UTC


README

使用方法

use CodGlo\CGAccounting\Services\AccountingService;

class SomeController extends Controller
{
    protected $accountingService;

    public function __construct(AccountingService $accountingService)
    {
        $this->accountingService = $accountingService;
    }

    public function transferCredit()
    {
        $result = $this->accountingService->credit('Cash', 'Bank', 1000);
        // Handle the result...
    }

    public function transferDebit()
    {
        $result = $this->accountingService->debit('Bank', 'Cash', 500);
        // Handle the result...
    }
}