comment('Installing stancl/tenancy...'); $this->callSilent('vendor:publish', [ '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', '--tag' => 'config', ]); $this->info('✔️ Created config/tenancy.php'); if (! file_exists(base_path('routes/tenant.php'))) { file_put_contents(base_path('routes/tenant.php'), file_get_contents(__DIR__ . '/../../assets/tenant_routes.php.stub')); $this->info('✔️ Created routes/tenant.php'); } else { $this->info('Found routes/tenant.php.'); } $this->callSilent('vendor:publish', [ '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', '--tag' => 'providers', ]); $this->info('✔️ Created TenancyServiceProvider.php'); $this->callSilent('vendor:publish', [ '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', '--tag' => 'migrations', ]); $this->info('✔️ Created migrations. Remember to run [php artisan migrate]!'); if (! is_dir(database_path('migrations/tenant'))) { mkdir(database_path('migrations/tenant')); $this->info('✔️ Created database/migrations/tenant folder.'); } $this->comment('✨️ stancl/tenancy installed successfully.'); } }