1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 23:24:03 +00:00

Fixed: make migration commands compatible

This commit is contained in:
Samuel Štancl 2022-03-30 16:49:01 +02:00
parent f04d4cd80f
commit a63906f3fd
4 changed files with 44 additions and 20 deletions

View file

@ -0,0 +1,20 @@
<?php
namespace Stancl\Tenancy\Concerns;
trait ExtendsLaravelCommand
{
public function getName(): ?string
{
return static::getDefaultName();
}
public static function getDefaultName(): ?string
{
if (method_exists(static::class, 'getTenantCommandName')) {
return static::getTenantCommandName();
}
return 'tenants:' . parent::getDefaultName();
}
}