Skip to content

What's wrong with $row on format not returning an element but the collection? #2238

Answered by emiliosh
emiliosh asked this question in Q&A
Discussion options

You must be logged in to vote

Yes I'm on v2.

This is resolutiontype relation at Resolution model.

  ...
   public function resolutiontype()
    {
        return $this->belongsTo(ResolutionType::class, 'resolutiontype_id');
    }
  ...

Finally I was able to make it work doing what you suggest.

public function configure: void
{
   ...
    $this->setAdditionalSelects('resolutiontypes.name as resolutiontypename');
   ...
}

And then in my column reference with:

            Column::make(__('Tipo'), 'resolutiontype.code')
                        ->tooltip('resolutiontypename'),

This was working before. Thanks.

Replies: 2 comments 2 replies

Comment options

lrljoe
Apr 2, 2025
Collaborator Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@lrljoe
Comment options

lrljoe Apr 17, 2025
Collaborator Sponsor

@emiliosh
Comment options

Answer selected by emiliosh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants