mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:34:04 +00:00
26 lines
563 B
PHP
26 lines
563 B
PHP
<?php
|
|
|
|
namespace Stancl\Tenancy\Concerns;
|
|
|
|
trait ExtendsLaravelCommand
|
|
{
|
|
protected function specifyTenantSignature(): void
|
|
{
|
|
$this->setName('tenants:migrate');
|
|
$this->specifyParameters();
|
|
}
|
|
|
|
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();
|
|
}
|
|
}
|