protected function getTenantKey($tenant)
{
if ($tenant instanceof Model) {
$tenant = $tenant->getForeignKey();
}
if (!is_string($tenant)) {
throw new TenantColumnUnknownException('$tenant must be a string key or an instance of \\Illuminate\\Database\\Eloquent\\Model');
}
return $tenant;
}