write name using id
in there i have company_id and i want using that write company_name how ican do it ?
Solution:Jump to solution
Please don't tag as per #✅┊rules
No that doesn't make sense like.
I think what you want is to use:...
4 Replies
How do you mean? an ID isn't a name so how can it write it.
like in
purchase
table i have company_id
and using that i want to take company_id
and in company
table take name where id === company_id
u got it ?
@toeknee
??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.
okay sorry and thanks ❤️