- What does the inisiatif/distribution-financings package do?
- It is a Laravel package intended to abstract the logic for sharing and distributing financings, such as allocations, disbursements, or fund splits across beneficiaries, projects, or categories. It ships Laravel-native pieces including Eloquent models, migrations, a config file, and optional views. The repository is maintained under the atInisiatifZakat GitHub organization and is aimed at distribution workflows common in zakat and charity management systems. The README is still close to the default package skeleton, so treat the exact domain model as something to confirm in the source code before adopting it.
- How do I install inisiatif/distribution-financings with Composer?
- Install it with composer require atInisiatifZakat/distribution-financings, which is the command shown in the README, though the Packagist name resolves as inisiatif/distribution-financings. After installation, publish the migrations with php artisan vendor:publish --tag=distribution-financings-migrations and run php artisan migrate. You can also publish the config file and views using the distribution-financings-config and distribution-financings-views tags respectively. Laravel package discovery should register the service provider automatically.
- Which PHP and Laravel versions does distribution-financings support?
- The package is built for modern Laravel and the technical evaluation notes a PHP 8.1+ requirement, so you should be running a recent PHP 8 release. Because the config file published by the package is empty and the README does not list explicit version constraints, check the composer.json in the repository for the exact illuminate/support and PHP requirements before upgrading or installing. This matters most if your application still runs older Laravel versions.
- Is the documentation good enough to get started quickly?
- Not yet. The README still contains placeholder text, and the usage example shows a generic echoPhrase call rather than a real distribution workflow, so it will not teach you the domain model on its own. You will need to read the source, migrations, and tests to understand how financings and distributions are represented and persisted. Expect to write your own integration notes or an internal decision record if you adopt it.
- What is the domain model for a financing and a distribution in this package?
- The package is designed around distributing or sharing financing amounts across entities such as beneficiaries, projects, or categories, but the README does not document the concrete models, relationships, or table structure. The published migrations are the most reliable source of truth for fields, foreign keys, and constraints. Before building on it, run the migrations in a scratch database and inspect the schema so you can map it against your existing financial tables.
- Can I customize distribution rules, for example percentage-based or fixed-amount splits?
- The package is described as extensible for custom distribution strategies, so percentage-based, fixed-amount, or rule-based splits are the intended use case. However, no extension points, interfaces, or service contracts are documented in the README, so you should verify in the code whether rules are configurable, swappable, or hardcoded. If they are not abstracted, wrapping the package in your own service layer is the safer approach. Adding business rules for priority beneficiaries would then live in your application code.
- How do I run the package tests, and what quality checks are included?
- The README documents composer test for running the test suite. The repository's CI also runs PHPUnit, Laravel Pint for code style, and Psalm for static analysis, which indicates basic quality gates are in place. Running these locally after any customization is a quick way to catch regressions. If you extend the package, add your own tests around the distribution edge cases that matter to your workflow.
- Does the package track distributions for auditing and reporting?
- Auditability is listed as a design goal, and the package follows Laravel conventions, so distribution records are expected to be stored via Eloquent models that you can query for reporting. Whether events, custom logging, or status transitions are emitted is not documented, so check for model events, observers, or log tables in the source. For regulated environments you will likely need to add your own immutable audit trail on top. Confirm this before relying on the package as your system of record.
- Is distribution-financings safe to use in production?
- Treat it as early-stage. It was released in 2025, has no dependents and little community adoption, and the documentation leaves key assumptions unstated, all of which raise the risk of undiscovered edge-case bugs. The MIT license and lack of heavy dependencies make it low-risk to evaluate, but you should run a spike against realistic data, including insufficient funds and invalid split scenarios, before committing. Defining rollback behavior and load-testing at your expected distribution volume are sensible prerequisites.
- What alternatives exist if distribution-financings does not fit my application?
- For simple cases, a custom service layer combined with Laravel policies, observers, and database transactions gives you full control with much lower risk. If you only need to split amounts and record them, plain Eloquent models with an audit table may be enough. The package is still worth reviewing as a reference implementation of distribution logic rather than a mandatory dependency. Weigh adoption against the cost of documenting and validating an undocumented domain model.