binarcode/laravel-tenantable
A Laravel package for adding multi-tenancy to Eloquent models. Apply the Tenantable trait to scope queries and relationships to the current tenant, with support for tenant resolution and data isolation. Keeps tenant-aware model code simple while helping prevent cross-tenant access.
composer require <vendor>/<package>:"^2.7"
Use ^2.6 only if you are still on Laravel 12 and want to defer the upgrade; do not use * during the Laravel 13 transition.README and UPGRADING/CHANGELOG first. For 2.7.0 the only change is framework support, so no migration steps are expected — but confirm there is no unpublished config or migration stub added since the version you last used.php artisan vendor:publish --provider="Vendor\\Package\\PackageServiceProvider"
vendor/bin/phpunit --testsuite=... inside the package, or a single smoke test in your app). This validates the new framework path end-to-end before you touch a real project.composer why-not <vendor>/<package> 2.7 to see exactly which locked dependency is blocking. Do the package bump before the framework bump where possible, so any failure is attributable.^2.7 safe to use across Laravel 11–13 in most cases; the matrix is what proves it.new. Inject the package's contracts/services via constructor injection so tests can swap implementations. Where the package offers a fake or an in-memory driver, prefer it; otherwise bind a stub in a test service provider.config/. Publish the config file once and drive environment differences through env() keys referenced from that file, not by editing vendor defaults. This keeps upgrades diff-friendly.composer.lock, deploy with composer install --no-dev --optimize-autoloader, and re-run php artisan package:discover (or optimize:clear then config:cache) as part of the release step.composer update rather than at runtime. If you see an unexpected failure, run composer update "<vendor>/<package>" --with-dependencies -W and read the conflict output rather than deleting the lock file.config/<package>.php shadows new keys added in later releases. After upgrading, diff the published file against the vendor stub and merge manually — new options silently default otherwise.php artisan config:cache and php artisan package:discover after a version bump. A stale bootstrap/cache/packages.php is a common cause of "class not found" that only appears on the deployed environment.php artisan queue:restart) and Octane/Horizon on deploy; a code-only rollover leaves old code in memory.composer check-platform-reqs on the target host/container before assuming a Laravel 13 upgrade is complete.php artisan about to confirm the detected framework and package versions, then check the package's log channel and storage/logs/laravel.log. If behaviour changed only after the upgrade, diff the published config and re-run with config:clear before suspecting the package itself.How can I help you explore Laravel packages today?