Locker\Repository\Statement\EloquentLinker::getModels PHP Method

getModels() protected method

Gets the statements as an array from the database.
protected getModels ( [\stdClass] $statements, StoreOptions $opts ) : [Model]
$statements [\stdClass]
$opts StoreOptions
return [Model]
    protected function getModels($statements, StoreOptions $opts)
    {
        $statement_ids = array_map(function (\stdClass $statement) use($opts) {
            return $statement->id;
        }, $statements);
        $models = $this->where($opts)->whereIn('statement.id', $statement_ids)->get();
        return $models->all();
    }