norialabs/platform
norialabs/platform is a modular Laravel foundation for multi-tenant SaaS applications, bundling tenancy, authentication, billing, and admin tooling into one extensible package with sensible defaults, clean architecture, and test-friendly conventions.
Install the package with Composer, publish its config and migrations, then run migrations:
composer require norialabs/platform
php artisan vendor:publish --tag=platform-config
php artisan vendor:publish --tag=platform-migrations
php artisan migrate
Start by reading config/platform.php, the package service provider, and the rebuild entry point (php artisan list will show the exact command name, commonly something like platform:rebuild). Your first use case should be a disposable local environment: define one platform resource in config, run the rebuild command, inspect the created records, then change the definition and rebuild again. In v0.1.13, the second rebuild is the important one—removed definitions are retired and their prior records are archived rather than hard-deleted.
Treat platform definitions as declarative source code and the rebuild command as the reconciliation step. Keep definitions in config or a dedicated service provider, commit them, and run the rebuild as part of deployment after migrations.
Typical workflow:
Use the package’s managed records as read-only from application code. If you need extra metadata, store it in a separate table or a custom field that the rebuild will not overwrite. For queries against platform-managed models, explicitly decide whether archived records should be included. Prefer a package-provided scope if one exists; otherwise filter on the archive column (for example whereNull('archived_at')).
Integration tips:
RefreshDatabase: define a resource, rebuild, remove it from the definition, rebuild again, and assert the record is archived rather than missing.The v0.1.13 behavior is the main pitfall: a rebuild no longer deletes records that are absent from the new definition—it archives them. Code that assumed hard deletion may now find stale rows. Audit unique indexes and lookups that do not account for archived records.
Common issues:
--dry-run, use it in production first.Before upgrading existing environments, review any code that queries platform tables and add archive-aware scopes. Then run a rebuild in staging and compare active versus archived counts.
How can I help you explore Laravel packages today?