Skip to content

Commit c3d5037

Browse files
committed
Add Model query whereDate support
1 parent 4056a73 commit c3d5037

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

src/Query/Builder.php

+70
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,76 @@ protected function compileWhereBetween(array $where)
11351135
];
11361136
}
11371137

1138+
/**
1139+
* @param array $where
1140+
* @return array
1141+
*/
1142+
protected function compileWhereDate(array $where)
1143+
{
1144+
extract($where);
1145+
1146+
$where['operator'] = $operator;
1147+
$where['value'] = $value;
1148+
1149+
return $this->compileWhereBasic($where);
1150+
}
1151+
1152+
/**
1153+
* @param array $where
1154+
* @return array
1155+
*/
1156+
protected function compileWhereMonth(array $where)
1157+
{
1158+
extract($where);
1159+
1160+
$where['operator'] = $operator;
1161+
$where['value'] = $value;
1162+
1163+
return $this->compileWhereBasic($where);
1164+
}
1165+
1166+
/**
1167+
* @param array $where
1168+
* @return array
1169+
*/
1170+
protected function compileWhereDay(array $where)
1171+
{
1172+
extract($where);
1173+
1174+
$where['operator'] = $operator;
1175+
$where['value'] = $value;
1176+
1177+
return $this->compileWhereBasic($where);
1178+
}
1179+
1180+
/**
1181+
* @param array $where
1182+
* @return array
1183+
*/
1184+
protected function compileWhereYear(array $where)
1185+
{
1186+
extract($where);
1187+
1188+
$where['operator'] = $operator;
1189+
$where['value'] = $value;
1190+
1191+
return $this->compileWhereBasic($where);
1192+
}
1193+
1194+
/**
1195+
* @param array $where
1196+
* @return array
1197+
*/
1198+
protected function compileWhereTime(array $where)
1199+
{
1200+
extract($where);
1201+
1202+
$where['operator'] = $operator;
1203+
$where['value'] = $value;
1204+
1205+
return $this->compileWhereBasic($where);
1206+
}
1207+
11381208
/**
11391209
* @param array $where
11401210
* @return mixed

0 commit comments

Comments
 (0)