betalabs/engine-laravel-helper
A Laravel helper package from Betalabs that bundles reusable utility functions for Engine-based applications. It streamlines common tasks so developers can avoid duplicating boilerplate across projects, keeping code cleaner and more consistent within the Betalabs ecosystem.
Scopes\Tenant, BelongsToTenant) now qualifies the filter as tabela.tenant_id, fixing DB-level "ambiguous column" failures on JOINed queries (e.g. _fields=orders->code). This is a functional defect on any tenant-scoped listing/reporting endpoint — a PM should treat it as a bug-fix justification for the upgrade rather than an optional improvement.Services\Tenant\Updater now always writes engine_api_access_token to the engine registry, and the NFe TaxInvoice\Indexer prefers the nfe registry. This confirms multi-registry-per-tenant is a supported topology — relevant if the roadmap includes tenants with more than one ERP/engine connection, or mixed NFe + non-NFe tenants. Previously these credentials silently landed on "the first registry," which is a misconfiguration class of bug, not a crash.betalabs/engine-phpsdk ^3.0), not the code volume.^6.0 constraint.Adopt when all of the following hold:
engine-phpsdk raised to ^3.0, package routes registered in bootstrap/app.php (Laravel 11/12), removal of Passport::routes() calls, and publishing passport-migrations on databases that lack the oauth_* tables.Look elsewhere / defer when:
engine-phpsdk 2.x — stay on the 5.x line; 6.x is not available to you and 5.x has now diverged (note the tenant-scope hotfix exists there separately as v3.0.2-equivalent behaviour).To executives: v6.0.2 is a stabilization release for our Betalabs Engine integration, not a feature release. Its business value is twofold: it unblocks our PHP 8.5 / Laravel 12 upgrade path, and it fixes a real multi-tenant correctness bug where JOINed tenant-scoped queries (reporting and order listings) could be rejected by the database. It also fixes credential placement for tenants with more than one registry, which removes a silent misconfiguration risk for our more complex accounts. Cost is a bounded migration sprint, gated on our PHP floor being at 8.2 or above.
To engineering: treat this as a planned migration, not a version bump. Scope: raise PHP to ^8.2 and engine-phpsdk to ^3.0; register the package routes in bootstrap/app.php and delete any Passport::routes() calls; publish passport-migrations where oauth_* tables are absent; pin the dependency to exactly v6.0.2 (the v6.0.0 tag references stale code — do not trust floating constraints). Verify the tenant-scope fix against at least one real JOINed query in our codebase, and confirm behaviour for tenants with multiple registries. Also note the vendor's test suite was broken from v4 onward and has only just been repaired — we should compensate with our own integration coverage around tenant isolation and NFe indexing rather than relying on upstream tests.
How can I help you explore Laravel packages today?