public function scopeWithType(Builder $query, $type)
    {
        // We do this for querying, searching and sorting with source attributes
        $this->setNodeTypeName($type);

        return $this->scopeWhereTranslation($query, 'source_type', $type, null);
    }
public function scopeWithType(Builder $query, $type)
    {
        // We do this for querying, searching and sorting with source attributes
        $this->setNodeTypeName($type);

        return $this->scopeWhereTranslation($query, 'source_type', $type, null);
    }
public function scopeWithType ( Builder $ query , $ type ) { // We do this for querying, searching and sorting with source attributes $ this -> setNodeTypeName ( $ type ) ; return $ this -> scopeWhereTranslation ( $ query , 'source_type' , $ type , null ) ; }
Scope for selecting with type

@param Builder $query
@param string $type
@return Builder
Scope for selecting with type