From 867a905ed380e1c238766ae828287a2823591bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sat, 19 Oct 2019 21:07:45 +0200 Subject: [PATCH] Create routes/tenant.php only if the file does not exist --- src/Commands/Install.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Commands/Install.php b/src/Commands/Install.php index 8217b904..76144de4 100644 --- a/src/Commands/Install.php +++ b/src/Commands/Install.php @@ -53,9 +53,10 @@ class Install extends Command file_put_contents(app_path('Http/Kernel.php'), $newKernel); $this->info('✔️ Set middleware priority'); - file_put_contents( - base_path('routes/tenant.php'), - "info('✔️ Created routes/tenant.php'); + ); + $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.');