1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:14:04 +00:00

TenantCouldNotBeIdentified ProvidesSolution

This commit is contained in:
Samuel Štancl 2019-09-23 11:54:38 +02:00
parent 10c5f8d98d
commit bd1c829520
2 changed files with 16 additions and 2 deletions

View file

@ -11,7 +11,8 @@
],
"require": {
"illuminate/support": "^6.0",
"webpatser/laravel-uuid": "^3.0"
"webpatser/laravel-uuid": "^3.0",
"facade/ignition-contracts": "^1.0"
},
"require-dev": {
"vlucas/phpdotenv": "^3.3",

View file

@ -4,10 +4,23 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Exceptions;
class TenantCouldNotBeIdentifiedException extends \Exception
use Facade\IgnitionContracts\BaseSolution;
use Facade\IgnitionContracts\ProvidesSolution;
use Facade\IgnitionContracts\Solution;
class TenantCouldNotBeIdentifiedException extends \Exception implements ProvidesSolution
{
public function __construct($domain)
{
$this->message = "Tenant could not be identified on domain $domain";
}
public function getSolution(): Solution
{
return BaseSolution::create('Tenant could not be identified on this domain')
->setSolutionDescription('Did you forget to create a tenant for this domain?')
->setDocumentationLinks([
'Creating Tenants' => 'https://tenancy.samuelstancl.me/docs/v2/creating-tenants/',
]);
}
}