mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:14:04 +00:00
Remove unused file [ci skip]
This commit is contained in:
parent
3f650d887d
commit
335bdc1c06
1 changed files with 0 additions and 30 deletions
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy;
|
||||
|
||||
class Tenant
|
||||
{
|
||||
public $uuid;
|
||||
public $domain;
|
||||
public $databaseName;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array|string $data
|
||||
*/
|
||||
public function __construct($data)
|
||||
{
|
||||
$data = is_string($data) ? json_decode($data, true) : (array) $data;
|
||||
|
||||
$this->uuid = $data['uuid'];
|
||||
$this->domain = $data['domain'] ?? tenancy()->getTenantById($data['uuid'], 'domain');
|
||||
$this->databaseName = $data['database_name'] ?? $this->getDatabaseName($data);
|
||||
}
|
||||
|
||||
public function getDatabaseName($uuid = null)
|
||||
{
|
||||
$uuid = $uuid ?: $this->uuid;
|
||||
return config('tenancy.database._prefix_base') . $uuid . config('tenancy.database._suffix');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue