Replies: 2 comments 8 replies
-
I'm not sure why you get a SQL Exception. I think I've only used it on |
Beta Was this translation helpful? Give feedback.
3 replies
-
why don't use the macro on the Query Builder instead of the Eloquent Builder |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
today I tried to refactor some code where the pivot of a many-to-many relation was conditionally added.
I used the when statement but got an SQL Exception with the following code:
I investigated the frameworks code base. The 'Conditionable Trait' is used only in the 'Query' class and not the 'Relation' class.
Are there any reasons why it's not supporting the relations?
Beta Was this translation helpful? Give feedback.
All reactions