K
K
Konstantin B.2017-04-23 20:03:41
Laravel
Konstantin B., 2017-04-23 20:03:41

How to get the post id from the intermediate table without getting the posts themselves?

there are models Post and Tag, respectively, and three tables posts, tags and post_tag
How to get the post id from the intermediate table without getting the posts themselves?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
miki131, 2017-04-23
@Kostik_1993

Laravel <5.4
Tag::posts()->allRelatedIds();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question