From c6ebc09a9df41fafd5438305ec5b067663baab35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 15 Aug 2019 16:49:30 +0200 Subject: [PATCH] wip --- src/Commands/Install.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Commands/Install.php b/src/Commands/Install.php index a57406fe..3dc1bc33 100644 --- a/src/Commands/Install.php +++ b/src/Commands/Install.php @@ -27,19 +27,19 @@ class Install extends Command */ public function handle() { - $this->line('Installing stancl/tenancy... ⌛'); - $this->call('vendor:publish', [ + $this->comment('Installing stancl/tenancy... ⌛'); + $this->callSilent('vendor:publish', [ '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', '--tag' => 'config', ]); - $this->info('✔️ Created config/tenancy.php'); + $this->info('✔️ Created config/tenancy.php'); file_put_contents(app_path('Http/Kernel.php'), str_replace( 'protected $middlewarePriority = [', 'protected $middlewarePriority = [\n \Stancl\Tenancy\Middleware\InitializeTenancy::class', file_get_contents(app_path('Http/Kernel.php')) )); - $this->info('✔️ Set middleware priority'); + $this->info('✔️ Set middleware priority'); file_put_contents(base_path('routes/tenant.php'), "info('✔️ Created routes/tenant.php'); + $this->info('✔️ Created routes/tenant.php'); + $this->line(''); $this->line("The package lets you store data about tenants either in Redis or in a relational database like MySQL. If you're going to use the database storage, you need to create a tenants table."); $migration = $this->ask('Do you want to publish the default database migration? [yes/no]', 'yes'); if (\strtolower($migration) === 'yes') { - $this->call('vendor:publish', [ + $this->callSilent('vendor:publish', [ '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', '--tag' => 'migrations', ]); - $this->info('✔️ Created migration.'); + $this->info('✔️ Created migration.'); } - $this->info('\n✔️stancl/tenancy installed successfully ✨.'); + $this->line(''); + $this->info('✔️ stancl/tenancy installed successfully ✨.'); } }