1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-06-21 19:44:04 +00:00

Remove detailed tenancy references from boost resources for better clarity and maintainability

This commit is contained in:
eramitgupta 2026-06-02 12:38:17 +05:30
parent fde2bf0cf4
commit 882eaef8b4
20 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,73 @@
# Installation Reference
Use this when installing or auditing `stancl/tenancy` setup.
## Source Files
- `src/Commands/Install.php`
- `src/TenancyServiceProvider.php`
- `assets/config.php`
- `assets/tenant_routes.stub.php`
- `assets/TenancyServiceProvider.stub.php`
- `assets/migrations/*`
## Required Steps
1. Install the package.
```bash
composer require stancl/tenancy
```
2. Run the installer non-interactively.
```bash
php artisan tenancy:install --no-interaction
```
3. Confirm these files exist:
- `config/tenancy.php`
- `routes/tenant.php`
- `app/Providers/TenancyServiceProvider.php`
- `database/migrations/2019_09_15_000010_create_tenants_table.php`
- `database/migrations/2019_09_15_000020_create_domains_table.php`
- `database/migrations/tenant`
4. Review `config/tenancy.php` before running migrations.
5. Run central migrations.
```bash
php artisan migrate
```
6. Add tenant migrations to `database/migrations/tenant`.
7. Create tenants and domains according to the identification strategy.
8. Run tenant migrations.
```bash
php artisan tenants:migrate
```
## Manual Publish Commands
Prefer `tenancy:install`. Use these only for targeted publishing:
```bash
php artisan vendor:publish --provider="Stancl\Tenancy\TenancyServiceProvider" --tag=config
php artisan vendor:publish --provider="Stancl\Tenancy\TenancyServiceProvider" --tag=routes
php artisan vendor:publish --provider="Stancl\Tenancy\TenancyServiceProvider" --tag=providers
php artisan vendor:publish --provider="Stancl\Tenancy\TenancyServiceProvider" --tag=migrations
php artisan vendor:publish --provider="Stancl\Tenancy\TenancyServiceProvider" --tag=impersonation-migrations
php artisan vendor:publish --provider="Stancl\Tenancy\TenancyServiceProvider" --tag=resource-syncing-migrations
```
## Installer Behavior
- Publishes config, routes, provider, and base migrations.
- Creates `database/migrations/tenant`.
- Skips files that already exist and warns instead of overwriting.
- Shows an interactive support prompt unless `--no-interaction` is used.