mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 18:14:04 +00:00
updates
This commit is contained in:
parent
492d1cc538
commit
2e156ef0ce
5 changed files with 36 additions and 49 deletions
|
|
@ -10,7 +10,6 @@
|
||||||
"require": {
|
"require": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
||||||
"facade/ignition-contracts": "^1.0",
|
|
||||||
"ramsey/uuid": "^3.7|^4.0",
|
"ramsey/uuid": "^3.7|^4.0",
|
||||||
"stancl/jobpipeline": "^1.0",
|
"stancl/jobpipeline": "^1.0",
|
||||||
"stancl/virtualcolumn": "^1.0"
|
"stancl/virtualcolumn": "^1.0"
|
||||||
|
|
|
||||||
|
|
@ -4,25 +4,22 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Exceptions;
|
namespace Stancl\Tenancy\Exceptions;
|
||||||
|
|
||||||
use Facade\IgnitionContracts\BaseSolution;
|
|
||||||
use Facade\IgnitionContracts\ProvidesSolution;
|
|
||||||
use Facade\IgnitionContracts\Solution;
|
|
||||||
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
||||||
|
|
||||||
// todo: in v4 this should be suffixed with Exception
|
// todo: in v4 this should be suffixed with Exception
|
||||||
class TenantCouldNotBeIdentifiedById extends TenantCouldNotBeIdentifiedException implements ProvidesSolution
|
class TenantCouldNotBeIdentifiedById extends TenantCouldNotBeIdentifiedException
|
||||||
{
|
{
|
||||||
public function __construct($tenant_id)
|
public function __construct($tenant_id)
|
||||||
{
|
{
|
||||||
parent::__construct("Tenant could not be identified with tenant_id: $tenant_id");
|
parent::__construct("Tenant could not be identified with tenant_id: $tenant_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSolution(): Solution
|
// public function getSolution(): Solution
|
||||||
{
|
// {
|
||||||
return BaseSolution::create('Tenant could not be identified with that ID')
|
// return BaseSolution::create('Tenant could not be identified with that ID')
|
||||||
->setSolutionDescription('Are you sure the ID is correct and the tenant exists?')
|
// ->setSolutionDescription('Are you sure the ID is correct and the tenant exists?')
|
||||||
->setDocumentationLinks([
|
// ->setDocumentationLinks([
|
||||||
'Initializing Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants',
|
// 'Initializing Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants',
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,21 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Exceptions;
|
namespace Stancl\Tenancy\Exceptions;
|
||||||
|
|
||||||
use Facade\IgnitionContracts\BaseSolution;
|
|
||||||
use Facade\IgnitionContracts\ProvidesSolution;
|
|
||||||
use Facade\IgnitionContracts\Solution;
|
|
||||||
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
||||||
|
|
||||||
class TenantCouldNotBeIdentifiedByPathException extends TenantCouldNotBeIdentifiedException implements ProvidesSolution
|
class TenantCouldNotBeIdentifiedByPathException extends TenantCouldNotBeIdentifiedException
|
||||||
{
|
{
|
||||||
public function __construct($tenant_id)
|
public function __construct($tenant_id)
|
||||||
{
|
{
|
||||||
parent::__construct("Tenant could not be identified on path with tenant_id: $tenant_id");
|
parent::__construct("Tenant could not be identified on path with tenant_id: $tenant_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSolution(): Solution
|
// public function getSolution(): Solution
|
||||||
{
|
// {
|
||||||
return BaseSolution::create('Tenant could not be identified on this path')
|
// return BaseSolution::create('Tenant could not be identified on this path')
|
||||||
->setSolutionDescription('Did you forget to create a tenant for this path?')
|
// ->setSolutionDescription('Did you forget to create a tenant for this path?')
|
||||||
->setDocumentationLinks([
|
// ->setDocumentationLinks([
|
||||||
'Creating Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants/',
|
// 'Creating Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants/',
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,21 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Exceptions;
|
namespace Stancl\Tenancy\Exceptions;
|
||||||
|
|
||||||
use Facade\IgnitionContracts\BaseSolution;
|
|
||||||
use Facade\IgnitionContracts\ProvidesSolution;
|
|
||||||
use Facade\IgnitionContracts\Solution;
|
|
||||||
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
||||||
|
|
||||||
class TenantCouldNotBeIdentifiedByRequestDataException extends TenantCouldNotBeIdentifiedException implements ProvidesSolution
|
class TenantCouldNotBeIdentifiedByRequestDataException extends TenantCouldNotBeIdentifiedException
|
||||||
{
|
{
|
||||||
public function __construct($tenant_id)
|
public function __construct($tenant_id)
|
||||||
{
|
{
|
||||||
parent::__construct("Tenant could not be identified by request data with payload: $tenant_id");
|
parent::__construct("Tenant could not be identified by request data with payload: $tenant_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSolution(): Solution
|
// public function getSolution(): Solution
|
||||||
{
|
// {
|
||||||
return BaseSolution::create('Tenant could not be identified with this request data')
|
// return BaseSolution::create('Tenant could not be identified with this request data')
|
||||||
->setSolutionDescription('Did you forget to create a tenant with this id?')
|
// ->setSolutionDescription('Did you forget to create a tenant with this id?')
|
||||||
->setDocumentationLinks([
|
// ->setDocumentationLinks([
|
||||||
'Creating Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants/',
|
// 'Creating Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants/',
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,21 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Exceptions;
|
namespace Stancl\Tenancy\Exceptions;
|
||||||
|
|
||||||
use Facade\IgnitionContracts\BaseSolution;
|
|
||||||
use Facade\IgnitionContracts\ProvidesSolution;
|
|
||||||
use Facade\IgnitionContracts\Solution;
|
|
||||||
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
||||||
|
|
||||||
class TenantCouldNotBeIdentifiedOnDomainException extends TenantCouldNotBeIdentifiedException implements ProvidesSolution
|
class TenantCouldNotBeIdentifiedOnDomainException extends TenantCouldNotBeIdentifiedException
|
||||||
{
|
{
|
||||||
public function __construct($domain)
|
public function __construct($domain)
|
||||||
{
|
{
|
||||||
parent::__construct("Tenant could not be identified on domain $domain");
|
parent::__construct("Tenant could not be identified on domain $domain");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSolution(): Solution
|
// public function getSolution(): Solution
|
||||||
{
|
// {
|
||||||
return BaseSolution::create('Tenant could not be identified on this domain')
|
// return BaseSolution::create('Tenant could not be identified on this domain')
|
||||||
->setSolutionDescription('Did you forget to create a tenant for this domain?')
|
// ->setSolutionDescription('Did you forget to create a tenant for this domain?')
|
||||||
->setDocumentationLinks([
|
// ->setDocumentationLinks([
|
||||||
'Creating Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants/',
|
// 'Creating Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants/',
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue