E
E
eternalfire2018-09-03 13:00:46
Laravel
eternalfire, 2018-09-03 13:00:46

How to build a query using Eloquent?

Dear friends, please tell me how to build a query in one line
. I have two tables users and chats. The users table has id, name, phone columns. The chats table has columns id, user_id and chat_id. Tables are related by users.id and chats.user_id
How to get phone by chat_id in one query, thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mShpakov, 2018-09-03
@mShpakov

Everything is written here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question