public static function make($query, Model $model = null)
    {
        if ($query instanceof EloquentBuilder) {
            $model = $query->getModel();
            $query = $query->getQuery();
        }

        return new Joiner($query, $model);
    }
public static function make($query, Model $model = null)
    {
        if ($query instanceof EloquentBuilder) {
            $model = $query->getModel();
            $query = $query->getQuery();
        }

        return new Joiner($query, $model);
    }
public static function make ( $ query , Model $ model = null ) { if ( $ query instanceof EloquentBuilder ) { $ model = $ query -> getModel ( ) ; $ query = $ query -> getQuery ( ) ; } return new Joiner ( $ query , $ model ) ; }
Create new joiner instance.

@param  \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder $query
@param  \Illuminate\Database\Eloquent\Model $model
@return \Sofa\Eloquence\Relations\Joiner
Create new joiner instance .