diff --git a/assets/tenant_routes.php.stub b/assets/tenant_routes.php.stub new file mode 100644 index 00000000..a51c3f1c --- /dev/null +++ b/assets/tenant_routes.php.stub @@ -0,0 +1,16 @@ +info('✔️ Set middleware priority'); - file_put_contents( - base_path('routes/tenant.php'), - "info('✔️ Created routes/tenant.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->line(''); $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.');