R
R
Rooly2021-02-01 06:55:23
Laravel
Rooly, 2021-02-01 06:55:23

What does $this->pivot return if there are many MtoM Laravel links?

Hello colleagues!

Could you explain how to understand what $this->pivot returns, if in my case for one model there are two intermediate tables that connect this model with two others? There is no possibility to check on the web server.

I drew an illustration to somehow facilitate the formulation of the question.

What $this->pivot ---> PropertyOption or Order will return

Taken from the github repository that I'm studying and there is no connection between Sku and Order in the reverse order (maybe the author just forgot), I provided it in such an option in which this implemented --> pivot table for both Order and PropertyOption is created

Method where $this->pivot is called from Sku model

60177b8429cdf886220369.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexandzolotarev, 2017-07-24
@ChrisMenschenin

Change opacity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question