Download the PHP package supplycart/domains without Composer
On this page you can find all versions of the php package supplycart/domains. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package domains
Laravel Domains
A lightweight, route-focused domain registry for Laravel 13.
The package keeps domain bootstrapping deliberately small: it registers each domain's routes, while Laravel handles events, model observers, and authorization policies through its native discovery and attribute APIs. When routes are cached, the configured domains are not loaded at all.
Requirements
- PHP 8.5 or later
- Laravel 13
Installation
Install the package and publish its configuration:
Creating a domain
Generate a domain with Artisan:
This creates the domain under app/Domains/User, including its domain class,
model, policy, controller, and routes file.
Register the generated domain class in config/domains.php:
The generated domain owns its route registration:
Domains without routes can inherit the default no-op implementation.
Queued scaffolding
Use the --queues option to also generate an event, a discoverable listener,
and a queued job:
Discover domain listeners from bootstrap/app.php:
The generated model is linked to its policy with Laravel's #[UsePolicy]
attribute. Register model observers with Laravel's #[ObservedBy] attribute.
Production optimization
Run Laravel's optimizer during deployment or image creation:
Once routes are cached, the package skips the configured domain list entirely.
Upgrading from version 1
Version 2 removes domain-level $listeners, $observers, $policies, init(),
and reflection-based route discovery. When upgrading:
- Move listeners to Laravel event discovery.
- Register observers with
#[ObservedBy]. - Register policies with
#[UsePolicy]. - Implement
registerRoutes()explicitly in domains that own routes.
All versions of domains with dependencies
illuminate/console Version ^13.0
illuminate/contracts Version ^13.0
illuminate/support Version ^13.0