1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:14:04 +00:00
tenancy/src/Exceptions/TenantCountNotBeIdentifiedById.php
Jørgen Solli b77bf9f179
Allows tenants to be initalized with their IDs (#473)
* Allows tenants to be initalized with their IDs

* Code style, note

Co-authored-by: Samuel Stancl <samuel.stancl@gmail.com>
2020-08-04 18:12:28 +02:00

27 lines
905 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Exceptions;
use Facade\IgnitionContracts\BaseSolution;
use Facade\IgnitionContracts\ProvidesSolution;
use Facade\IgnitionContracts\Solution;
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
class TenantCountNotBeIdentifiedById extends TenantCouldNotBeIdentifiedException implements ProvidesSolution
{
public function __construct($tenant_id)
{
parent::__construct("Tenant could not be identified with tenant_id: $tenant_id");
}
public function getSolution(): Solution
{
return BaseSolution::create('Tenant could not be identified with that ID')
->setSolutionDescription('Are you sure the ID is correct and the tenant exists?')
->setDocumentationLinks([
'Initializing Tenants' => 'https://tenancyforlaravel.com/docs/v3/tenants',
]);
}
}