src/Label305/AujaLaravel/Config/AujaConfigurator.php
public function getTableName(Model $model, ModelConfig $config = null) {
        if (empty($this->models)) {
            throw new \LogicException('AujaConfigurator not configured yet! Call configure first.');
        }

        if (!isset($this->configs[$model->getName()])) {
            throw new \LogicException(sprintf('AujaConfigurator not configured for model %s', $model->getName()));
        }

        $result = null;
        if ($config != null && $config->getTableName() != null) {
            $result = $config->getTableName();
        } else {
            $modelConfig = $this->configs[$model->getName()];
            $result = $modelConfig->getTableName();
        }

        return $result;
    }
public function getTableName(Model $model, ModelConfig $config = null) {
        if (empty($this->models)) {
            throw new \LogicException('AujaConfigurator not configured yet! Call configure first.');
        }

        if (!isset($this->configs[$model->getName()])) {
            throw new \LogicException(sprintf('AujaConfigurator not configured for model %s', $model->getName()));
        }

        $result = null;
        if ($config != null && $config->getTableName() != null) {
            $result = $config->getTableName();
        } else {
            $modelConfig = $this->configs[$model->getName()];
            $result = $modelConfig->getTableName();
        }

        return $result;
    }
Finds the name of the table for given Model, using the `ModelConfig` class for the `Model`.
Uses the overridden value if present, or falls back to the generated value.

@param Model       $model  The `Model` to find the table name for.
@param ModelConfig $config The `ModelConfig` to use for retrieving the table name.

@return String The name of table for given Model.