protected function buildRelationshipQuery($field_parameters)
    {
        if (isset($field_parameters['table']) && ! $this->onlyQueryFrom == 'model') {
            $table = $field_parameters['table'];

            return DB::table($table);
        } elseif (isset($field_parameters['model']) && ! $this->onlyQueryFrom == 'table') {
            $class = $field_parameters['model'];
            $model = new $class;

            if ($model instanceof Model) {
                return $model;
            }

            throw new Exception('Class \''.$class.'\' must be an isntance of \''.Model::class.'\'');
        }

        throw new Exception('No valid query to build from field parameters');
    }