From 6d13ff825aee907b14df99d26a4797106531ef5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 15 Oct 2019 18:49:34 +0200 Subject: [PATCH] Update install command --- src/Commands/Install.php | 14 +++++++------- tests/CommandsTest.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Commands/Install.php b/src/Commands/Install.php index 1bf334e9..7fd0b670 100644 --- a/src/Commands/Install.php +++ b/src/Commands/Install.php @@ -59,9 +59,9 @@ class Install extends Command | Tenant Routes |-------------------------------------------------------------------------- | -| Here is where you can register tenant routes for your application. These -| routes are loaded by the TenantRouteServiceProvider within a group -| which contains the \"InitializeTenancy\" middleware. Good luck! +| Here you can register the tenant routes for your application. +| These routes are loaded by the TenantRouteServiceProvider +| with the tenancy and web middleware groups. Good luck! | */ @@ -73,11 +73,11 @@ Route::get('/app', function () { $this->info('✔️ Created routes/tenant.php'); $this->line(''); - $this->line("This 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 tables for tenants and domains."); - if ($this->confirm('Do you want to publish the default database migrations?', true)) { + $this->line("This package lets you store data about tenants either in Redis or in a relational database like MySQL. To store data about tenants in a relational database, you need a few database tables."); + if ($this->confirm('Do you wish to publish the migrations that create these tables?', true)) { $this->callSilent('vendor:publish', [ - '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', - '--tag' => 'migrations', + '--provider' => 'Stancl\Tenancy\TenancyServiceProvider', + '--tag' => 'migrations', ]); $this->info('✔️ Created migrations. Remember to run [php artisan migrate]!'); } diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index 4cf8a92c..071f929c 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -130,7 +130,7 @@ class CommandsTest extends TestCase file_put_contents(app_path('Http/Kernel.php'), file_get_contents(__DIR__ . '/Etc/defaultHttpKernel.stub')); $this->artisan('tenancy:install') - ->expectsQuestion('Do you want to publish the default database migrations?', 'yes'); + ->expectsQuestion('Do you wish to publish the migrations that create these tables?', 'yes'); $this->assertFileExists(base_path('routes/tenant.php')); $this->assertFileExists(base_path('config/tenancy.php')); $this->assertFileExists(database_path('migrations/2019_09_15_000010_create_tenants_table.php'));