mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:34:03 +00:00
Use MySQL by default; create migrations/tenant in tenancy:install
This commit is contained in:
parent
be077ae73c
commit
47fb158b59
3 changed files with 12 additions and 4 deletions
|
|
@ -41,8 +41,9 @@ class Install extends Command
|
|||
));
|
||||
$this->info('✔️ Set middleware priority');
|
||||
|
||||
\file_put_contents(base_path('routes/tenant.php'),
|
||||
"<?php
|
||||
\file_put_contents(
|
||||
base_path('routes/tenant.php'),
|
||||
"<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -58,7 +59,8 @@ class Install extends Command
|
|||
Route::get('/your/application/homepage', function () {
|
||||
return 'This is your multi-tenant application. The uuid of the current tenant is ' . tenant('uuid');
|
||||
});
|
||||
");
|
||||
"
|
||||
);
|
||||
$this->info('✔️ Created routes/tenant.php');
|
||||
|
||||
$this->line('');
|
||||
|
|
@ -71,6 +73,11 @@ Route::get('/your/application/homepage', function () {
|
|||
$this->info('✔️ Created migration.');
|
||||
}
|
||||
|
||||
if (! \is_dir(database_path('migrations/tenant'))) {
|
||||
mkdir(database_path('migrations/tenant'));
|
||||
$this->info('✔️ Created database/migrations/tenant folder.');
|
||||
}
|
||||
|
||||
$this->comment('✨️ stancl/tenancy installed successfully.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue