write name using id

in there i have company_id and i want using that write company_name how ican do it ?

  TextColumn::make('purchase.company_id')
                    ->searchable()
                    ->sortable(),
Solution
Please don't tag as per #✅┊rules

No that doesn't make sense like.

I think what you want is to use:

purchase.company.name

assuming you have a relationship called company on the purchase model. And name on the company model.
Was this page helpful?