Getting Started
FeeCollection is installed into an existing Laravel application.
Requirements
- PHP 8.3+
- Laravel 13+
Install the Package
composer require 3mad/fee-collectionIf your application does not auto-discover service providers, register the package provider manually:
Emad\FeeCollection\Providers\FeeCollectionServiceProvider::classOptional PDF Support
Install DomPDF if your application should generate and store invoice, receipt, or credit note PDFs:
composer require barryvdh/laravel-dompdfPDF generation is controlled by the pdf.enabled config option.
Publish Package Files
Publish the configuration file:
php artisan vendor:publish --provider="Emad\FeeCollection\Providers\FeeCollectionServiceProvider" --tag=configPublish the default PDF Blade views:
php artisan vendor:publish --provider="Emad\FeeCollection\Providers\FeeCollectionServiceProvider" --tag=viewsPublished views are placed in:
resources/views/vendor/fee-collection/pdfRun Migrations
php artisan migrateThe migrations create these tables:
upcoming_paymentsaccount_statementsaccount_statement_upcoming_paymentswallet_transactions
wallet_transactions stores a single current balance row per walletable model.
Prepare a Payable Model
Add the UseFeeable trait to any Eloquent model that should own payments and statements.
use Emad\FeeCollection\Traits\UseFeeable;
class User extends Model
{
use UseFeeable;
}After this, the model can register payments, create receipts, generate due invoices, query statements, and read its wallet balance.