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:
parent
f04d4cd80f
commit
a63906f3fd
4 changed files with 44 additions and 20 deletions
20
src/Concerns/ExtendsLaravelCommand.php
Normal file
20
src/Concerns/ExtendsLaravelCommand.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue