fapost/foundation
Fapost Foundation is a Laravel/PHP package offering reusable base classes, service providers, and configuration conventions for bootstrapping applications. It helps standardize project structure and reduce repetitive setup across projects.
composer require fapost-lab/foundation and run the publishable install command (typically php artisan foundation:install). Publish config and migrations, then run php artisan migrate.config/foundation.php (or equivalent) and the Quota/Tenant contracts. The new v0.19.0 feature adds an operator-facing usage reporting path — look for a service, facade, or artisan command that lets an operator record per-period usage for a tenant.// Illustrative shape — check the actual API in v0.19.0
app(QuotaReporter::class)->report(
tenant: $tenant,
metric: 'api_calls',
amount: 150,
period: now()->startOfMonth(), // or let the package resolve the active period
);
ApiCallCompleted) and let a queued listener call the new operator reporting method. This keeps usage writes out of the request cycle and makes retries safe.usage_reports table with a unique constraint.increment/upsert) or wrap reports in a transaction with row locks. If the package’s reporter is not atomic, serialize per tenant with a cache lock.foundation:quota:show {tenant} for quick inspection.UsageReported or QuotaExceeded. Hook into them for audit logs, notifications, and billing sync rather than modifying package code.php artisan vendor:publish --tag=foundation-config --force cautiously and diff the config after upgrading.How can I help you explore Laravel packages today?