I'm new to Laravel and have stuck on something that supposed to be simple but i can't find the solution for it. I want to display a transaction record which take data from 2 other table. The parsed data is like this :
[
{
"id": 1,
"user_id": 1,
"product_id": 1,
//some other data
},
{
"id": 2,
"user_id": 1,
"product_id": 3,
//some other data
}
]
The 'user_id' and 'product_id' is taken from other 2 table, users and products in particular. I want to also display the use name which is located in the user table and the product name which is located in the product table on top of the transaction details.
@artonico That seems to be a recurring theme when working with Laravel, at least I've noticed it as such.. things end up being easier than it seems like they should be. :D