src/Elicit/Builder.php
public function getModels()
    {
        // First, we will simply get the raw results from the query builders which we
        // can use to populate an array with Eloquent models. We will pass columns
        // that should be selected as well, which are typically just everything.
        $results = $this->query->get();

        $connection = $this->model->getConnectionName();

        $models = [];

        // Once we have the results, we can spin through them and instantiate a fresh
        // model instance for each records we retrieved from the database. We will
        // also set the proper connection name for the model after we create it.
        foreach ($results as $result) {
            $models[] = $model = $this->model->newFromBuilder($result);

            $model->setConnection($connection);
        }

        return $models;
    }
public function getModels()
    {
        // First, we will simply get the raw results from the query builders which we
        // can use to populate an array with Eloquent models. We will pass columns
        // that should be selected as well, which are typically just everything.
        $results = $this->query->get();

        $connection = $this->model->getConnectionName();

        $models = [];

        // Once we have the results, we can spin through them and instantiate a fresh
        // model instance for each records we retrieved from the database. We will
        // also set the proper connection name for the model after we create it.
        foreach ($results as $result) {
            $models[] = $model = $this->model->newFromBuilder($result);

            $model->setConnection($connection);
        }

        return $models;
    }
public function getModels ( ) { // First, we will simply get the raw results from the query builders which we // can use to populate an array with Eloquent models. We will pass columns // that should be selected as well, which are typically just everything. $ results = $ this -> query -> get ( ) ; $ connection = $ this -> model -> getConnectionName ( ) ; $ models = [ ] ; // Once we have the results, we can spin through them and instantiate a fresh // model instance for each records we retrieved from the database. We will // also set the proper connection name for the model after we create it. foreach ( $ results as $ result ) { $ models [ ] = $ model = $ this -> model -> newFromBuilder ( $ result ) ; $ model -> setConnection ( $ connection ) ; } return $ models ; }
Get the hydrated models.

@return Model
Get the hydrated models .