mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:34:04 +00:00
Merge branch '3.x' into v9-test
This commit is contained in:
commit
3ab09ec83d
6 changed files with 7 additions and 7 deletions
|
|
@ -55,7 +55,7 @@ class Migrate extends MigrateCommand
|
|||
}
|
||||
|
||||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
$this->line("Tenant: {$tenant->getTenantKey()}");
|
||||
|
||||
event(new MigratingDatabase($tenant));
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class Rollback extends RollbackCommand
|
|||
}
|
||||
|
||||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
$this->line("Tenant: {$tenant->getTenantKey()}");
|
||||
|
||||
event(new RollingBackDatabase($tenant));
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class Run extends Command
|
|||
public function handle()
|
||||
{
|
||||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
$this->line("Tenant: {$tenant->getTenantKey()}");
|
||||
tenancy()->initialize($tenant);
|
||||
|
||||
$callback = function ($prefix = '') {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Seed extends SeedCommand
|
|||
}
|
||||
|
||||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
$this->line("Tenant: {$tenant->getTenantKey()}");
|
||||
|
||||
event(new SeedingDatabase($tenant));
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ class TenantList extends Command
|
|||
->cursor()
|
||||
->each(function (Tenant $tenant) {
|
||||
if ($tenant->domains) {
|
||||
$this->line("[Tenant] id: {$tenant['id']} @ " . implode('; ', $tenant->domains->pluck('domain')->toArray() ?? []));
|
||||
$this->line("[Tenant] {$tenant->getTenantKeyName()}: {$tenant->getTenantKey()} @ " . implode('; ', $tenant->domains->pluck('domain')->toArray() ?? []));
|
||||
} else {
|
||||
$this->line("[Tenant] id: {$tenant['id']}");
|
||||
$this->line("[Tenant] {$tenant->getTenantKeyName()}: {$tenant->getTenantKey()}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class UniversalRoutes implements Feature
|
|||
}
|
||||
|
||||
// Loop one level deep and check if the route's middleware
|
||||
// groups have the searhced middleware group inside them
|
||||
// groups have the searched middleware group inside them
|
||||
$middlewareGroups = Router::getMiddlewareGroups();
|
||||
foreach ($route->gatherMiddleware() as $inner) {
|
||||
if (! $inner instanceof Closure && isset($middlewareGroups[$inner]) && in_array($middleware, $middlewareGroups[$inner], true)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue