mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
* resolver refactor * Fix code style (php-cs-fixer) * make tenant column used in PathTenantResolver configurable, fix phpstan errors, minor improvements * support binding route fields, write tests for customizable tenant columns * Invalidate cache for all possible columns in path resolver * implement proper cache separation logic for different columns used by PathTenantResolver * improve return type --------- Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
27 lines
764 B
PHP
27 lines
764 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Stancl\Tenancy\Tests\Etc;
|
|
|
|
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
|
use Stancl\Tenancy\Database\Concerns\HasDatabase;
|
|
use Stancl\Tenancy\Database\Concerns\HasDomains;
|
|
use Stancl\Tenancy\Database\Concerns\HasPending;
|
|
use Stancl\Tenancy\Database\Concerns\MaintenanceMode;
|
|
use Stancl\Tenancy\Database\Models;
|
|
|
|
/**
|
|
* @method static static create(array $attributes = [])
|
|
*/
|
|
class Tenant extends Models\Tenant implements TenantWithDatabase
|
|
{
|
|
public static array $extraCustomColumns = [];
|
|
|
|
use HasDatabase, HasDomains, HasPending, MaintenanceMode;
|
|
|
|
public static function getCustomColumns(): array
|
|
{
|
|
return array_merge(parent::getCustomColumns(), static::$extraCustomColumns);
|
|
}
|
|
}
|