supplycart / domains
Domain Manager
Installs: 45 012
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: ^7.4|^8.0
Requires (Dev)
- orchestra/canvas: ^6.0
- orchestra/testbench: ^6.0
This package is auto-updated.
Last update: 2025-03-07 12:20:57 UTC
README
A simple package to set up domains for your applications.
Installation
To install through composer, run the following command from terminal:
composer require supplycart/domains
Then publish config using:
php artisan vendor:publish
Usage
You can set up a domain by creating a domain class which extends Supplycart\Domains\Domain
and register it inside domains.php
config file like this:
<?php return [ 'modules' => [ App\Domains\User\UserDomain::class ] ];
The folder structure suggested is as below:
app/
- Domains/
- User/
- Http/
- Controllers/
- routes.php # all routes in here
- Models/
- Policies/
- UserDomain.php # your domain class
- Cart
...
- Order
...
Command to populate domain folder
php artisan make:domain DomainName
To populate events, listeners and jobs you may pass in the --queues
argument.
php artisan make:domain DomainName --queues