1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:34:04 +00:00

Create routes/tenant.php only if the file does not exist

This commit is contained in:
Samuel Štancl 2019-10-19 21:07:45 +02:00 committed by GitHub
parent cfcb2574c2
commit 867a905ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,7 @@ class Install extends Command
file_put_contents(app_path('Http/Kernel.php'), $newKernel); file_put_contents(app_path('Http/Kernel.php'), $newKernel);
$this->info('✔️ Set middleware priority'); $this->info('✔️ Set middleware priority');
if (! file_exists(base_path('routes/tenant.php')) {
file_put_contents( file_put_contents(
base_path('routes/tenant.php'), base_path('routes/tenant.php'),
"<?php "<?php
@ -74,6 +75,9 @@ Route::get('/app', function () {
" "
); );
$this->info('✔️ Created routes/tenant.php'); $this->info('✔️ Created routes/tenant.php');
} else {
$this->info('Found routes/tenant.php.');
}
$this->line(''); $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.'); $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.');