A
A
Arthur2018-09-26 19:44:30
Laravel
Arthur, 2018-09-26 19:44:30

How to use where in many to many relationships?

Good evening.
There are three tables
posts
users
users_posts
In users_posts, in addition to user_id and post_id, there is a role, is it possible to filter the result by role when getting a connection?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2018-09-26
@ART_CORP

We read carefully -  https://laravel.com/docs/5.6/eloquent-relationship...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question