src/Metable.php
protected function joinMeta(Builder $query, $column)
    {
        $query->prefixColumnsForJoin();

        $alias = $this->generateMetaAlias();

        $table = (new Attribute)->getTable();

        $query->leftJoin("{$table} as {$alias}", function ($join) use ($alias, $column) {
            $join->on("{$alias}.metable_id", '=', $this->getQualifiedKeyName())
                ->where("{$alias}.metable_type", '=', $this->getMorphClass())
                ->where("{$alias}.meta_key", '=', $column);
        });

        return $alias;
    }
protected function joinMeta(Builder $query, $column)
    {
        $query->prefixColumnsForJoin();

        $alias = $this->generateMetaAlias();

        $table = (new Attribute)->getTable();

        $query->leftJoin("{$table} as {$alias}", function ($join) use ($alias, $column) {
            $join->on("{$alias}.metable_id", '=', $this->getQualifiedKeyName())
                ->where("{$alias}.metable_type", '=', $this->getMorphClass())
                ->where("{$alias}.meta_key", '=', $column);
        });

        return $alias;
    }
protected function joinMeta ( Builder $ query , $ column ) { $ query -> prefixColumnsForJoin ( ) ; $ alias = $ this -> generateMetaAlias ( ) ; $ table = ( new Attribute ) -> getTable ( ) ; $ query -> leftJoin ( "{$table} as {$alias}" , function ( $ join ) use ( $ alias , $ column ) { $ join -> on ( "{$alias}.metable_id" , '=' , $ this -> getQualifiedKeyName ( ) ) -> where ( "{$alias}.metable_type" , '=' , $ this -> getMorphClass ( ) ) -> where ( "{$alias}.meta_key" , '=' , $ column ) ; } ) ; return $ alias ; }
Join meta attributes table.

@param  \Sofa\Eloquence\Builder $query
@param  string $column
@return string
Join meta attributes table .