-
Clone the repository
-
Copy
.env.example
to.env
cp .env.example .env
-
Install dependencies to install Laravel Sail
composer install --ignore-platform-reqs
-
Start sail
./vendor/bin/sail up
-
Install composer dependencies
./vendor/bin/sail composer install
-
Install yarn dependencies
./vendor/bin/sail yarn
-
Generate application key
./vendor/bin/sail artisan key:generate
-
Run database migrations for the landlord/central database
./vendor/bin/sail artisan migrate --path=database/migrations/landlord
-
Create a sample tenant
./vendor/bin/sail artisan tenants:create
- For the ID - choose any unique string e.g.
tenant
- For the domain(s) - choose the subdomain you'd like to use to access the tenant's routes e.g.
tenant
would result intenant.localhost
- For the ID - choose any unique string e.g.
-
(Optional) Run database seeders for the tenant database
./vendor/bin/sail artisan tenants:seed
-
Migrate tenants
./vendor/bin/sail artisan tenants:migrate
This project uses Laravel Settings for it's settings. So the process is inline with the package's documentation.
- Create a new settings class
./vendor/bin/sail artisan make:settings SettingsName --group=groupName --path=App/Models/Settings/
- Add the settings properties to the class
- Create the settings migration (note: the path is important here)
./vendor/bin/sail artisan make:settings-migration CreateSettingsName database/migrations/tenant
- Add the settings to the migration
- Add the settings class to the
config.settings.settings
config file
- Generate the JS translation files (if any have been added/updated)
./vendor/bin/sail artisan zora:generate
- Production-ify JS/CSS
./vendor/bin/sail artisan yarn prod