code: protected function orderByMeta(Builder $query, $args, $alias)
      {
          $query->with('metaAttributes')->getQuery()->orderBy("{$alias}.meta_value", $args->get('direction'));
  
          return $query;
      }
docs: Order query by meta attribute.
  
  @param  \Sofa\Eloquence\Builder $query
  @param  \Sofa\Hookable\Contracts\ArgumentBag $args
  @param  string $alias
  @return \Sofa\Eloquence\Builder