protected $table;
public function __construct($type) {
$this->table = 'table_' . $type;
}
$Tables = new Tables(1);
$Tables->where('id',1)->get();
/**
* @param $tableNumber
*/
public static function switchTo($tableNumber)
{
$instance = new static;
$instance->setTable("table_{$tableNumber}");
return $instance->newQuery();
}