Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DB::table('table')
- ->where(function($q) {
- $q->whereBetween('from_date', ['from', 'to']);
- })
- ->orWhere(function($q) {
- $q->whereBetween('to_date ', ['from', 'to']);
- })
- ->orWhere(function($q) {
- $q->where('from_date', '<=', 'from')
- ->where('to_date', '>=', 'to');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement