HipsterJazzbo\Landlord\TenantManager::addTenant PHP Method

addTenant() public method

Add a tenant to scope by.
public addTenant ( string | Model $tenant, mixed | null $id = null )
$tenant string | Illuminate\Database\Eloquent\Model
$id mixed | null
    public function addTenant($tenant, $id = null)
    {
        if (func_num_args() == 1) {
            $id = $tenant->getKey();
        }
        $this->tenants->put($this->getTenantKey($tenant), $id);
    }