Replies: 1 comment
-
You forgot to rename But you can do this via macros in both classes. |
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.
-
I often have to compare two timeframes (e.g. appointments) to see if they overlap. In Carbon, there is
CarbonPeriod::overlaps()
, and I'd like to build something like that forBuilder
. Something like this:This would generate SQL which looks like this
There would also have to be a
whereColumnsOverlap(['apt_start', 'apt_end'],['col2_start','col2_end'])
that would generate SQL likeI'm not sure, but I think I'd have to make the following changes:
In
framework/src/Illuminate/Database/Query/Grammars/Grammar.php
, I'd addIn framework/src/Illuminate/Database/Query/Builder.php:
edit:fixed function name
Beta Was this translation helpful? Give feedback.
All reactions