<?php
namespace Koselig\Models;
use Illuminate\Database\Eloquent\Model;
use Koselig\Support\Wordpress;
class TermTaxonomy extends Model
{
public $timestamps = false;
protected $primaryKey = 'term_taxonomy_id';
protected $table = DB_PREFIX . 'term_taxonomy';
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
if (Wordpress::multisite() && (Wordpress::getSiteId() !== 0 && Wordpress::getSiteId() !== 1)) {
$this->setTable(DB_PREFIX . Wordpress::getSiteId() . '_term_taxonomy');
}
}
}