Download the PHP package 3neti/cash without Composer
On this page you can find all versions of the php package 3neti/cash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package cash
Short Description A package to enable assigning cash to Eloquent Models
License proprietary
Informations about the package cash
3neti/cash
A lightweight Laravel package for representing monetary value as a first-class model, with support for:
- precise money handling (via Brick\Money)
- wallet integration (via Bavix Wallet)
- status lifecycle (via Spatie Model Status)
- tagging (via Spatie Tags)
- metadata and expiration handling
This package is designed as a supporting domain layer for the x-change ecosystem, particularly for voucher issuance, redemption, and disbursement workflows.
โจ Core Concept
Cash is a value container:
- it represents an amount of money
- it can be tagged, status-tracked, and expired
- it can be linked to any model via
reference - it integrates with wallet systems for transfer and settlement
It is not a ledger
It is not a wallet
It is a portable monetary unit used across workflows.
๐ฆ Installation
โ๏ธ Configuration
Publish config (optional):
๐งฑ Database Migrations
This package uses:
So migrations are auto-loaded.
Run:
โ ๏ธ Migration Prerequisites
This package depends on the following schema:
spatie/laravel-model-statusโstatusestablespatie/laravel-tagsโtagstables3neti/wallet/bavix/laravel-walletโ wallet tables
๐ These must be installed and migrated by the host application.
This package does NOT publish or manage those migrations.
๐ง Usage
Creating Cash
Using Money Object
Stored internally as minor units.
Accessing Amount
Metadata
Expiration
Status Management
Secret Protection
Redemption Check
Tags
Wallet Integration
๐งพ Data Transformation
Use CashData for API responses:
๐งฑ Schema
๐งฉ Relationships
- morphTo:
reference - morphOne:
withdrawTransaction - statuses (Spatie)
- tags (Spatie)
- wallet (Bavix)
๐งช Testing
This package uses:
- Testbench
- in-memory SQLite
- test-only migrations under
tests/database/migrations
No vendor migrations are required for tests.
๐งญ Architecture Role
In the x-change ecosystem:
cash= monetary payloadvoucher= contract/instructionwallet= balance + ledgerx-change= orchestration
๐ Design Principles
- Money is always stored in minor units
- Currency is explicit
- Status is first-class
- Expiration is built-in
- Metadata is flexible
- Secrets are hashed
๐ Future Enhancements
- reconciliation support
- audit integration
- stricter immutability enforcement
- event hooks
๐งพ License
Proprietary
All versions of cash with dependencies
lorisleiva/laravel-actions Version ^2.9
brick/money Version ^0.10.1
spatie/laravel-model-status Version ^1.18
spatie/laravel-tags Version ^4.10
propaganistas/laravel-phone Version ^6.0
3neti/wallet Version ^v1.0