Download the PHP package turahe/ledger without Composer
On this page you can find all versions of the php package turahe/ledger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download turahe/ledger
More information about turahe/ledger
Files in turahe/ledger
Package ledger
Short Description A ledger management system for handling vouchers and invoices.
License MIT
Informations about the package ledger
Turahe Ledger Package
A comprehensive Laravel package for managing financial ledgers, invoices, vouchers, and payment tracking with PHP 8.4 support.
๐ Features
- Invoice Management - Create, update, and track invoices with items and payments
- Voucher System - Manage vouchers with expiration dates and status tracking
- Payment Processing - Support for multiple payment methods including QRIS, e-wallets, and traditional methods
- Multi-currency Support - Built-in currency handling with configurable defaults
- User Tracking - Comprehensive audit trail with user stamps
- Business Logic - Built-in methods for financial calculations and status checks
- Modern PHP - Full PHP 8.4 compatibility with enums and modern syntax
- Laravel Integration - Seamless integration with Laravel's ecosystem
๐ Requirements
- PHP 8.4+
- Laravel 12+
- MySQL/PostgreSQL/SQLite
๐ง Installation
-
Install the package via composer:
-
Publish resources (migrations and config files):
-
Execute migrations via the following command:
- Done!
โ๏ธ Configuration
The package configuration is located in config/ledger.php
. You can customize:
- Default currency
- Payment method settings
- Model class mappings
- Database table names
๐ Usage
Creating an Invoice
Adding Invoice Items
Processing Payments
Managing Vouchers
Using Query Scopes
Payment Methods
๐งช Testing
The package includes comprehensive test coverage. To run the tests:
Test Coverage
- Unit Tests - Model methods, business logic, and enums
- Feature Tests - Complete workflow testing
- Business Logic Tests - Financial calculations and validations
๐ Recent Optimizations
The package has been recently optimized with:
- PHP 8.4 Enum Support - Modern enum syntax and utility methods
- Enhanced Models - Improved relationships, casting, and business logic
- Service Layer - Centralized business logic in
LedgerService
- Trait System - Reusable
HasLedgerAttributes
trait for common functionality - Interface Contracts -
LedgerModelInterface
for consistent model behavior - Custom Exceptions - Specific error handling for ledger operations
- Improved Migrations - Fixed schema issues and added missing columns
- Better Testing - Comprehensive test coverage with proper setup
๐ Package Structure
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
๐ License
This package is open-sourced software licensed under the MIT license.
๐ Support
If you encounter any issues or have questions:
- Check the issues page
- Create a new issue with detailed information
- Ensure you're using the latest version
๐ Related Packages
- UserStamps - User tracking for models
- ULID - ULID support for Laravel