How do I write this in Laravel Query Builder: - I have a users table has one Customer with column 'phone'. - a customers table that belongs to User on 'user_id' with column 'mobile'.
I would like to find any customer id that with a phone number what either 'phone' or 'mobile'. Something like this:
select id from customers where mobile = '5555555555' or user_id = (select id from users where phone = '5555555555')
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jPClBu
via IFTTT
Aucun commentaire:
Enregistrer un commentaire