samedi 22 février 2020

Laravel Eloquent Join Using Another table

Hi how to convert this SQL query to Laravel Eloquent?
I have three table: payments, devices and users. Payments table does not store user_id. but table has device_id. And device table also has user_id.
I want to get user name which made payment.

select * from payments p 
join devices d on p.device_id = d.devid
join users u on d.user_id = u.id


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32oGR0E
via IFTTT

1 commentaire:

  1. Water Hack Burns 2lb of Fat OVERNIGHT

    More than 160000 women and men are using a simple and SECRET "liquids hack" to drop 2lbs each and every night in their sleep.

    It's proven and works every time.

    Here's how to do it yourself:

    1) Grab a glass and fill it with water half the way

    2) Then learn this weight loss hack

    and you'll become 2lbs lighter in the morning!

    RépondreSupprimer