Replies: 1 comment
-
Hey, I have also encountered this problem. Have you found a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
BelongsToMany::using() method not totally works. Work fine on create but not when I want get the collection through the relation.
I've two connections named website (default connection) and auth.
Steps To Reproduce:
Models :
Pivot :
Service using the relation User->accounts :
So when i want create a new record everything work ! But when i want to get the collection
$user->accounts
the using looks ignored..I've this error : (trying to use the model Account connection and not the pivot connection)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'auth.user_accounts' doesn't exist
Also I'm forced to precise the table in the belongsToMany cause the attribute $table in Pivot is ignored..
Beta Was this translation helpful? Give feedback.
All reactions